1. Before animation of the moving hand for throwing the grenade was cut,
now it's complete, like for normal grenade throw. To do that the code for
switching to previous weapon has changed location. selectweapon() isn't
used there, because if player has more grenades than 1, then after a throw
for a moment a grenade appeared in a hand, and just later previous weapon.
2. The changed code in quicknadethrow() prevents from shooting using right
mouse button, after starting to shoot quickly after grenade throw
(especially when player has more grenades than 1).
3. Also fixed resetting the "quicknade" variable.
It fixes the problem that activated grenade disappeared during switching
the weapons, when player tried to throw grenade when time for grenade
cooking was almost finished.
For example that fixes grenade attack animation, when in demo mode player
is spectated from 1st-person position. Till now there were visible
2 incomplete movements of the hand for throwing - first after activating
a grenade, second during throwing. Now there is visible one complete
movement, like in multiplayer.
1. Added background to description of selected keyinput item.
2. Added warning to menu footer, when user tries to bind already bound key.
3. Cleanup, fixed background color in description of selected active
menu items, when "menuitem" is absent in the menu.
Fixed animation of other players during following activities:
1. during jumping and attack - show attack animation;
2. during weapon reloading - don't show attack animation;
3. during grenade activation - don't show attack animation.
It bases on .../docs/images/icon.png from AC website repository,
just removed empty space, edges changed to more noticeable.
Note: on Mac an icon from assaultcube.icns is used.
Important: always custom code should be added to disable
error sounds because of SDL_ENABLEAPPEVENTS - after keys
pressing (see code below "ADDED SO IT DOESN'T BEEP BECAUSE
WE ENABLE SDL_ENABLEAPPEVENTS" comment).
It fixes the problem, that during spectating in 1st person view,
when spectated player collided (for example with wall) and crouched,
then his crouches weren't visible for player1.
Earlier if player held grenade in the hands and other player
connected to server and started to spectate him, then this second
player always saw assault rifle stats on the HUD as previously
selected weapon. It happens, because new client doesn't know, what
was previous weapon of players on the server, which didn't switch
yet weapon after its connection, so GUN_ASSAULT is set by default.
So if first player used for e.g. sniper rifle, then displayed ammo
stats were 0/0. Now then are displayed stats of primary weapon.
The script converted paths only when "mapmodel" or "texture"
strings were at beginning of the lines, now that is changed,
in order to paths will be converted also in, for example,
commented out lines.
Also changed name of the script to more proper.
Accuracy will be displayed only then, if scoreboard will be enabled, and
only for current weapon - in order to focus attention of players more on
gameplay/work for team than personal stats.
Added "accuracyinfo" command to see accuracy of all used weapons in
output console.
Added some cleanups and fixed memory leak.
When client connected to server (or started to play demo), where there was
a player dead since this client connecting, then position of the player
on minimap (and radar) was displayed wrongly outside of the map, sometimes
for the whole match. Now such positions will be hidden.
Stock strftime doesn't use capitalized "P", so for example on Windows
the wall clock didn't appear for 12h format. PM and AM are converted
to lowercase.
1. Counting backward for gametimedisplay = 1 and forward for 2. The setting
added to HUD menu.
2. Changed name from clockdisplay to gimetimedisplay, in order to
distinguish clocks with system time and game time.
3. Added to wall clock options with UTC/GMT time and 12h format.
DOCREF clockcount clockdisplay gametimedisplay
In second and next lines server description lost formatting, so also
colors, and it could be cut.
Now text in footer will be also divided by spaces, and not characters
(not applicable in case of long continuous strings).
LAN servers should be always visible, when user opens serverbrowser with
LAN servers only. And don't allow to switch from there to alternate views,
because for searchlan = 2 it doesn't make sense.
When spectator will send in non-team mode a message in team chat, then
other spectators will see it in blue colour - earlier was wrongly green,
like for normal chat.
When player1 spectated alive player and this watched player disconnected,
then camera1 pointed out still this non-existing player, for one main loop.
It had such negative effects, that hudgun could disappear to AC restart,
also AC crashed sometimes.
Tested mainly in tosok, on last alive player in a team.