Commit Graph
94 Commits
Author SHA1 Message Date
aurhat c1b10536c6 Don't duplicate bot names (almost) 2015-06-21 10:36:19 +02:00
aurhat dc1b920820 Cleanup bot code (server related) 2015-06-21 10:36:08 +02:00
aurhat 9613098697 Cleanup bot code 2015-06-21 10:34:07 +02:00
aurhat bfc273ee52 Select automatically menu item with chosen weapon 2015-06-13 23:40:05 +02:00
aurhat 842f120915 Fix and improve showing minimap and radar icons
Added features on minimap/radar:
1. local player is visible only when he doesn't follow;
2. player followed (watched) in third person point of view is visible
and his team too;
3. fix issue #99 ;
4. fix map position on radar, when player is followed in 3rd person pov -
before map didn't move with the followed player.
2015-06-07 14:24:14 +02:00
aurhat 0dc1340eef Add/change binds for demo mode and console 2015-06-07 13:57:14 +02:00
aurhat e64c2350d0 Increase speed of rewind
The commit increases very much speed of demo rewind and also prevents
AC freeze for gamespeed = 1000.
It may degrade physics for gamespeed = 1000 on very low end machines.
2015-06-05 13:37:25 +02:00
aurhat 65c2e0f83a Update locally position of dropped flag
After dropping the flag player1 will see for a very short moment,
before flag position will be updated by server, flag dropped at player1
position. Earlier he could see for this moment flag dropped in a place,
when it was picked up.
2015-05-13 20:43:56 +02:00
aurhat a9bf87b1e7 Indexing fix 2015-05-07 21:27:53 +02:00
aurhat b2da592d6e Save skin choice on quit 2015-05-07 18:58:34 +02:00
aurhat a1107a4318 Fix sound bug and remove wrong asserts for sound
The bug caused SIGTRAP during fastforwading demo in debug mode, when other
players disconnected.
These asserts were removed, because they can be triggered because of a bug.
2015-05-05 21:55:13 +02:00
aurhatandac-stef 8b2b7e0ac7 Change switching between spectate and edit mode
1. In multiplayer this switching isn't allowed, because it was broken
   and messed up, for example other players didn't see concurrently
   spectating and editing player.
2. In demo mode switching from spectate to edit mode is improved.
3. Several years broken code for edit mode is reverted.
2015-05-03 22:42:06 +02:00
aurhat 419c8717ba Hide team icon when player is in TEAM_SPECT and doesn't follow
Till now when player was in TEAM_SPECT and didn't follow (SM_FLY),
then wrongly CLA icon was displayed near the radar.
2015-05-03 22:12:02 +02:00
aurhat 1d497ac4d8 Add dedicated crosshair in edit mode
DOCREF loadcrosshair
2015-04-28 20:47:54 +02:00
aurhat b96066031b Remove items-tmp.png - obsolete temporary file 2015-04-28 20:46:14 +02:00
aurhat 8916ad4fa4 Fix playing weapon sounds
No more sounds audible on the whole map in bot modes, when bots change
weapon or have no ammo.
Gun change sound in bot code was a duplicate, so removed.
2015-04-25 20:11:26 +02:00
aurhat 0969310be2 Fix local akimbo expiration 2015-04-25 19:12:40 +02:00
aurhat 6e7246d6cd Disable debug messages in bot modes
Uncomment added line to enable these messages.
2015-04-17 21:08:25 +02:00
aurhat 4e0e128b16 Fix and improve displaying map message in menu 2015-04-17 17:11:34 +02:00
aurhat beeba9ad76 Add Code::Blocks project for Linux 2015-04-06 12:24:50 +02:00
aurhat c3ae2066d0 Don't check a duplicate of player1 name in demo mode 2015-04-05 21:58:29 +02:00
aurhat 1d1c9e6f96 Improve key binds
Changes:
1. added single aliases bounded to the keys, in order to maintain easier
the binds;
2. cleaned up binds;
3. updated Keyboard menu and fixed searching binds.
Remark: aliases bounded to the keys shouldn't have leading and trailing
white spaces, if they are present in Keyboard menu, otherwise they won't
be found. So construction like, for example: bind SLASH [ key_commandline ]
is inadmissible.
4. Alternate edit binds (default disabled) moved to
config/opt/alternateeditbinds.cfg and removed old_editbinds variable.

DOCREF old_editbinds
2015-04-03 23:44:22 +02:00
aurhat 5de86f9838 Cleanup
Fixed nested list in Cubescript, fixed conopen (now read-only), removed changeteam(),
fixed name of shortcuts for team survivor modes (so it fixes
https://github.com/assaultcube/AC/issues/73 ).

DOCREF ts tsurv btsurv
2015-03-29 14:57:29 +02:00
aurhat 82f0f4e128 Remove leftover blend parameter from drawequipicons function 2015-03-22 21:55:05 +01:00
aurhat 13ed2bd977 Fix akimbo expiring
Before, if player switched to akimbo just as it expired, he ended up with
akimbo and 0 ammo. Now his weapon will change to default weapon (the most
often primary), as if he would take akimbo in the hands.
2015-03-16 21:16:42 +01:00
aurhat d05ea601bd Rename fullscreenscript to fullscreentoggle
Commit adds also fullscreen setting to QUICK setup menu.

DOCREF fullscreentoggle
2015-03-08 21:22:39 +01:00
aurhat 63bbd353fc Align equipment icons and stats on HUD
Among other things it fixes https://github.com/assaultcube/AC/issues/65 .
It betters also display for oldfashionedgunstats=1.
2015-03-07 12:17:44 +01:00
aurhat 6b27825a52 Revert "sdl_ttf, utf8"
This reverts commit 33683a9471.
2015-02-14 16:12:45 +01:00
aurhat f640b23a95 Revert "test font"
This reverts commit f65b11525b.
2015-02-14 16:12:44 +01:00
aurhat 1b70e0b94d Remove obsolete utf8 code/dependencies
It reverts part of e232a3f3ac ,
also removes dependencies from all IDE.
2015-02-14 16:12:43 +01:00
aurhatandac-stef a284064e9f Complete backwards
Use LSHIFT to direct TAB-completion to browse backwards through the
available alternatives.

also: full cleanup of the commandcomplete()-code [by stef]

* fix crashing buffer overflow
* remove some ancient ludicrous code
* ignore more spaces
* browse command- and filename-alternatives in alphabetical order
* clean up nickcomplete
* more comments (sry)
2015-02-12 12:10:22 +01:00
aurhat befd22d2e8 Don't hide the sniper rifle scope if scoreboard is enabled
The fix also allows to turn on/off the scope during intermission (since
a few years the scope was blocked in intermission, because it was
immediately turned off by scoreboard).
2015-02-08 23:05:37 +01:00
aurhat 87bb20e799 Fix sound bug on shallow water 2015-02-07 15:01:57 +01:00
aurhat 67049f5e73 In demo mode show info about different map rev only if map is loaded 2015-02-07 14:26:12 +01:00
aurhat d5763d9f5b More accurate info, when player joins match with less than 60s to end 2015-01-24 22:41:37 +01:00
aurhat c31399a36a Add additional options to crosshairfx
0 - turn off all effects; 1 - turn on all effects;
2 - turn on color change/off size change for AR and > 3 shots in a row;
3 - turn off color change/on size change for AR and > 3 shots in a row.
It fixes https://github.com/assaultcube/AC/issues/72 .

DOCREF crosshairfx
2015-01-24 12:44:45 +01:00
aurhat 3470b49963 Fix spawn issues in bot modes
It fixes https://github.com/assaultcube/AC/issues/62 : "Respawning in bot
modes doesn't reset camera".
Also only 1 click will be needed to spawn, because it looks, that note in:
https://github.com/assaultcube/AC/commit/f9ec71cbab638189ea4fa3f664e2584605e2ba0e
isn't true now.
2015-01-24 12:21:51 +01:00
aurhat d86e1a9581 Allow only flying spectating in bot modes 2015-01-24 12:18:48 +01:00
aurhat f1d00c27c8 Update SDL and SDL_image
SDL libraries are updated to v. 1.2.15, SDL_image libraries and headers
to v. 1.2.12. SDL headers were updated to v.1.2.15 earlier, in commit
78e1621e52 .
2015-01-18 22:18:48 +01:00
aurhat 3d143a07bc Fix "alive" state for sounds
Earlier player in spectator mode heard still tinnitus and heartbeat sounds.
2015-01-06 13:00:42 +01:00
aurhat cac9e4b471 Reset shots in a row after death
Earlier was, for example, such negative effect, that when player had AR
and more than 3 shots in a row and died, then after spawn he saw
for a moment bigger crosshair (if he didn't turn off this default effect).
2015-01-06 13:00:19 +01:00
aurhat 779627cb94 Remove obsolete recorddemo/stopdemo from menu 2014-12-31 16:58:33 +01:00
aurhat a78eb73ffe Clear mapstartonce alias on quit 2014-12-31 16:43:30 +01:00
aurhat 8205f24f68 Revert "Turn off sniper rifle's scope during intermission"
This reverts commit 60eb0ac393.
There is possible to turn off a scope by weapon changing (however
behaviour of scope during intermission can be changed in "next" branch).
2014-12-26 23:30:26 +01:00
aurhat f6cd6ffb7e Revert "inWater" command
This reverts commit 1e20bace2e ,
because inWater command doesn't work and it looks, that it's useless.

DOCREF inWater
2014-12-25 22:56:09 +01:00
aurhat aa127afbdd Cleanup maprot 2014-12-13 22:35:55 +01:00
aurhat 8e6fbd9d7b Add the clock to scoreboard and change clockdisplay
Commit shows time in format mm:ss in scoreboard, instead of
"X minutes remaining" info.
It also enables the clock default on the HUD and adds "clockcount"
variable which let to choose between counting forward or backward
in the clocks.

DOCREF clockdisplay clockcount
2014-12-06 17:53:29 +01:00
aurhat 990f6e9c8b Fix output messages in console
Fixes:
1. show time remaining in system console after each minute;
2. correct form of minute(s);
3. show info "everyone died!" instead of "team SPECTATOR has won
the round!" in demo mode;
4. show correct info to which team (name) was player forced, when player1
is spectator.
2014-12-06 17:17:19 +01:00
aurhat bd50e67f65 Allow persistent spectating concrete player in multiplayer
For spectatepersistent = 1 that is always enabled (that means, that
spectated player isn't changed after his death), for 0  - only in
non-arena modes, except of demos.
"if(!available.length()) return f;" is introduced, in order to, in arena
modes, doesn't happen switching to SM_FLY, when last alive players dies
in the same moment and there is no winner of the round.
2014-12-02 21:05:47 +01:00
aurhat 795fad52b6 Fix spectating after disconnection of spectated player
Before if you watched player from the first spectating position
(SM_FOLLOW1ST), and that player disconnected, then you switched
automatically to another player, but also to second spectating position
(SM_FOLLOW3RD), instead of stay in SM_FOLLOW1ST - this commit fixes that.
2014-12-02 21:01:16 +01:00
aurhat fa483e1fcd Add custom description of demos
Custom description is displayed in "Watching demo" and "Play demo" menu.
2014-11-29 16:06:50 +01:00
aurhat 6e0e7bb333 Optimize and fix autodownload feature
The commit:
1. fixes value of download speed in KB;
2. introduces unique names of progress_callback() functions;
3. removes one unnecessary write_callback() function;
4. removes duplicated code/info in loadmodel().
2014-11-26 21:05:07 +01:00
aurhat 2dc74797af Don't show HUD reflection on water surface
For reflectclip > 1 player's HUD reflects on water surface.
It fixes https://github.com/assaultcube/AC/issues/75
2014-11-26 20:58:37 +01:00
aurhatandac-stef c4ce44867f Fix reset of packages source servers list
Earlier "resetpckservers" command cleared this list, instead of reset
to the initial settings.
2014-11-15 17:37:30 +01:00
aurhat 87bf71c8f1 Change position of "SCROLL/SPACE..." HUD messages
Now "SCROLL/SPACE..." messages will be visible on the right side
of display, in every standard aspect ratio.
2014-11-15 15:12:06 +01:00
aurhat b6a5418c24 Add alternative views in serverbrowser and improve favourites
Alternative views in the serverbrowser are implemented with use favourites.
Categories (names) of favourite servers, which will be displayed on the
views, have to be included in "serverbrowseraltviews" alias (accessible
in menu).
Switching between views is possible with use Alt + Mouse wheel and
Alt + Up/Down (or eventually "[" and "]", if they are dedicated keys
on your keyboard).

The commit also:
1. adds MATCH category to favourites;
2. shows category name in settings of favourites;
3. shows weights in serverbrowser instead of favourites image,
when showweights = 1;
4. cleans up some tabs.
2014-11-11 21:07:19 +01:00
aurhat 170f377262 Fix gonext command and do it random
Commit fixes broken "gonext" command, among other things reading time
from maprot, and it does random result of this command.
It also removes get_next() function, because it messes up the maprot,
so shouldn't be used.
2014-11-05 19:19:33 +01:00
aurhat bc3be8136e Revert "unfiltered display of preview"
This reverts commit 5450296879.
I don't know, why the code was changed before, but that caused, that images
in menu weren't transparent, for example image of favourites in
the serverbrowser.
2014-11-02 14:33:47 +01:00
aurhat 8838972e83 Display HUD messages over some less important info 2014-10-04 20:27:44 +02:00
aurhat 7fae0d2a2f Fix warning messages to spammer changing name/skin
Warning message will be sent only to spammer changing name/skin,
and only in multiplayer, what fixes issue:
https://github.com/assaultcube/AC/issues/66
2014-10-04 20:25:44 +02:00
aurhat 931c442f67 Improve "favourite servers" feature
The commit:
1. does serverdescription keyword case insensitive for
showonlyfavourites > 0;
2. fixes typo in argument of alias in keyword;
3. fixes disabling background color for servers of the category, when
alpha is changed to 0;
4. shows 0 instead of 10 in info about digit, which toggles 10th category;
5. adds info about "image" attribute in favourites.cfg;
6. adds new feature: "Search for servers".
2014-10-04 20:25:44 +02:00
aurhat 05b902ba11 Show always all servers after forcing serverlist update 2014-10-04 20:25:43 +02:00
aurhat f9ec71cbab Fix switching from spectator to active team in bot modes
Before this fix player could switch from spectate to alive mode,
but he stayed in SPECTATOR team.
Note: 2 mouse clicks are necessary to player's spawn. Second respawnself()
is needed, because spawnplayer() is executed before server will switch
player1 to active team, so he would always spawn in CLA base (in bot
team modes).
2014-09-30 10:45:18 +02:00
aurhat 075c53a6b0 Better visibility for warning about outdated AC version
Commit changes also masterserver URL to AC homepage in info related
to this warning.
2014-09-20 16:45:22 +02:00
aurhat ca9305dd02 Fix - don't allow dead body of player to climb on the ladder
It was visible probably only locally.
2014-09-20 00:45:21 +02:00
aurhat 533797f6e7 Don't show "connecting to $servername", if server doesn't have a name 2014-09-20 00:29:27 +02:00
aurhatandac-stef 414c69fef7 fix illegal typecast
fixes crash during intermission caused by activated and held grenade
2014-09-11 10:47:44 +02:00
aurhatandac-stef d021909224 Restore old working quicknadethrow code and fix bug in it
This commit restores old working quicknadethrow code, which existed after
commit: https://github.com/assaultcube/AC/commit/aaeca4ef323f09d252498bcc66eb90d51aef4586
and keeps later bug fixes (which thought needed to be fixed).
It fixes https://github.com/assaultcube/AC/issues/25

It also fixes followed bug: after releasing right mouse button/G key
and quickly pressing it again, weapon, to which quicknadethrow switched,
starts to shoot.
2014-07-19 14:43:35 +02:00
aurhatandac-stef ced0baf67a Removed unnecessary restrictions of switching to SPECTATOR team
Note: spectate() function doesn't have such restrictions.
2014-07-19 14:38:33 +02:00
aurhatandac-stef 7c4a7e54f4 Disable listdemos and getdemo in singleplayer 2014-07-19 14:38:33 +02:00
aurhatandac-stef 60eb0ac393 Turn off sniper rifle's scope during intermission 2014-07-19 14:38:33 +02:00
aurhatandac-stef 38d88602aa Drop activated grenade, when player switches to edit mode 2014-07-19 14:38:33 +02:00
aurhat 69cbf95401 Prevent displaying remote servers on startup of LAN servers browser
After startup of LAN servers browser there appeared sometimes also remote
servers, instead of only LAN servers.
I such case "si.lastpingmillis=servermenumillis" for all remote servers.
So this commit changes a little existing condition, to prevent above
problem.
2014-07-08 22:51:33 +02:00
aurhatandac-stef 79943778e7 Show list of demos in "Download demo" menu 2014-07-08 19:02:17 +02:00
aurhat 4c3176611a Two fixes concerning items selection in menu
The first fixes the last use of menusel, that wasn't checked for range yet.
The second one brings menusel back into range, if there is no
refresh function.
2014-07-05 12:55:15 +02:00
aurhat c2dbf57816 Do "SCROLL to change player" visible in any standard aspect ratio
Above text was cut for aspect ratio 5:4 (quite much) and 4:3 (a little) for
previous value "left = (VIRTW*3/2)*6/8"
2014-06-28 12:30:25 +02:00
aurhat 5a88f9c323 Fix bugs in spectator mode and removed unused FPCNs
First fix - now togglespect lets to return automatically to previously
spectated player, after spectating him, switching to "fly spectate" mode
and again to spectating players.
Second fix - now player doesn't land and stuck outside of new map,
when during spectating somebody map changed.
FCPNs are removed, because currently they aren't used.
2014-06-20 22:13:18 +02:00
aurhat 0898dfa384 Add list of standard resolutions to the settings in video menu 2014-06-19 13:52:31 +02:00
aurhatandac-stef 07780a8f92 move the clock to the right side 2014-06-11 22:24:31 +02:00
aurhat b566c54664 Two fixes of wrong messages about change to active/spectate mode.
First fix causes, that when player1: plays non-team mode + already is in active mode + changes team to enemy, then will appear message: "you can't switch teams while being alive".
Current wrong message is: "you can't change to active mode".

Second fix disables redundant info: "$playername changed to active play", after change to enemy team in non-team modes, when he is already in active mode.
2014-05-22 20:58:46 +02:00
aurhatandac-stef b728a33bb3 Fix of wrong stats of pistol's ammo on HUD
...when player holds nade and akimbo disappears.
To test the bug: take akimbo, take grenade, press "g"  and wait for akimbo disappearing.
Then stats on HUD shows, that player has pistol with 0 ammo, instead of full magazine.
2014-05-17 23:41:38 +02:00
aurhat 77f5b15ba9 Fix of doubled end of round, when spectator changes mode to active, short of the new round start.
This is fix of  https://github.com/assaultcube/AC/issues/18 . Patch restores structure changed in commit: https://github.com/assaultcube/AC/commit/5c117d .
There is added only "c.state.state==CS_SPECTATE" condition.
2014-05-17 12:00:54 +02:00
aurhatandac-stef c0c68053e8 Fix of endless round in team arena mode
...when one team becomes empty, and in second team there are
more players than 1.

This is fix of https://github.com/assaultcube/AC/issues/24 .
2014-05-15 17:35:08 +02:00
aurhatandac-stef 56c8a2295b Fix lets to disable a roll of remote players.
This is fix of https://github.com/assaultcube/AC/issues/16 .
Btw sending permanently the rolls of remote players is waste of bandwidth and money of server owners, so this pointless feature should be ultimately removed.
But untill it won't, the fix should be implemented, in order to not annoy players spectated other players.
2014-05-15 17:35:08 +02:00
aurhatandac-stef 126c5325d5 Fix of non-working "Watch other demo" after watching demo with arena mode.
This is fix of https://github.com/assaultcube/AC/issues/19 bug.
Currently, when player spawns in arena mode, all menus disappear, in order to force him to play and not being idle.
That causes problem, that  "Play demo" menu disappears, when you watch demo with arena mode, and choose "Watch other demo".
It happens so, because after chosing "Watch other demo" player spawns on empty map, what causes vanishing of  "Play demo menu".
The commit causes, that menus are automatically closed exclusively then, when player is connected to server, because only then this feature is desired.
2014-05-15 17:35:08 +02:00
aurhatandac-stef 295553bc95 Fix and update of AssaultCube project in Code::Blocks (for Windows).
What the commit does:
1. adds curl libraries for mingw from http://curl.haxx.se/gknw.net/7.34.0/dist-w32/curl-7.34.0-devel-mingw32.zip ;
2. adds to the linker "wldap32" and curl libraries;
3. adds "-t" parameter to the client compiled in debug mode, in order to it will start in windowed mode;
4.  adds "-D_DEBUG" option to debug modes, in order to get more debug informations;
5. adds icon also to AC server and master binaries;
6. lets to see debug info in console from client compiled in debug mode (removed "-mwindows" and added "gdi32" library to the linker);
7. adds missing jpegenc.h, modelcache.h, scale.h headers to the project.
2014-05-15 10:09:08 +02:00
aurhat 88f9448238 Fix of the bug, which causes crash on Windows because of missing "history" file.
After first run of git AC version "config/history" file doesn't exist, what causes crash of  Windows AC version,  which can't find this file.
Commit just adds checking, whether this file exists - "if(!histbuf) return;" in loadhistory() .
Commit fixes also location of some brackets and spaces, in order to keep proper AC style.
2014-04-08 22:23:58 +02:00
aurhat 5b94bab21f Fix of wrong "alive" status in scoreboard.
This commit fixes the issue: https://github.com/assaultcube/AC/issues/21
Player in spectate mode isn't dead, so when he switches from spectate to active mode, he is still non-dead.
Therefore d->state=="CS_DEAD" doesn't work in such cases.
This commit removes also some aimless line.
2014-04-05 13:52:41 +02:00
aurhat 599e62336a Patch adds flags reset in ctf/htf mode after "shuffleteams".
Nowadays after teams rearrangemend flags are only dropped and don't return to base.
2014-03-30 15:38:29 +02:00
aurhat 1bb7a5d7ac Restoring previous conditions in setfollowplayer().
Current conditions appeared with commit: https://github.com/assaultcube/AC/commit/8f39911eb0725b22bb4dc3a50d3e89702afcc49c
The problem with its is, that when player is SPECTATOR,  then "/setfollowplayer CN" command works only on players in CLA team, and should work on all, like "changefollowplayer".
This commit fixes that. Thread related to this bug: http://forum.cubers.net/thread-7495.html
2014-02-16 13:50:06 +01:00
aurhat ef165773b8 This commit fixes removing sleeps in "resetsleep" function.
To test this bug make, for example, 3 long-standing sleeps, add checking of number of sleeps before and after existing "loopv(sleep)",
and later  type "/resetsleeps" command in AC - result: 3 sleeps "before" and 1 remains "after".

Explanation by stef: after deleting elements from vectors there are no holes,
so if there were sleeps[0], sleeps[1] and sleeps[2], then after removing sleeps[0] there left
sleeps[0] and sleeps[1], so during next loop cycle this sleeps[0] is neglected (because i=1).

Commit just changes loopv to loopvrev (loop from end to begin).
2014-02-15 10:55:07 +01:00
aurhat cf3d2692ad This commit adds simple fix to "changespeed" script.
It shouldn't work in multiplayer and when gamespeed is less than 10 and grather than 1000.
To test  bug type in multiplayer, for example: "/changespeed 1100 30" .
2014-02-14 22:57:43 +01:00
aurhat b672cea505 This commit fixes bug related to bot mode, when it is started from non-bot mode.
To see this bug just start AC, run bot team mode and watch:
- "enemies" menu instead of  "team enemies" menu,
- number of players less by 2 than should be.
2014-02-12 21:19:55 +01:00
aurhat b33b74c11c Fixed reference to "scopesens" in old "zoom" script, because it is a variable nowadays, and not command.
Bug is visible clearly after typing  "/zoom 1".
2014-02-11 21:33:53 +01:00