Cstrike: cs_set_weapon_silen - Add a new value for draw_animation to follow game behavior

- Player's model sequence will be properly played
- Disallow firing while animation is playing
This commit is contained in:
Arkshine
2015-07-04 19:50:57 +02:00
parent 87d740b92a
commit 7842d0160b
2 changed files with 62 additions and 6 deletions

View File

@ -698,9 +698,12 @@ native cs_get_weapon_silen(index);
* @param index Weapon entity index
* @param silence If nonzero the weapon will be put into silenced
* mode, otherwise the silenced mode will be removed
* @param draw_animation If nonzero and the weapon is currently held by a
* @param draw_animation If 1 and the weapon is currently held by a
* client, the appropriate weapon animation will be
* played
* If 2, same as 1 but follows game behavior by playing
* the associated player's model sequence and disallowing
* firing while animation is playing.
*
* @return 1 if silenced mode set successfully, 0 if entity is
* not an applicable weapon