The cooldown entirely depends on the length of the S_PLAY_FIRE
and S_PLAY_FIRE_FINISH
states, from what I can see. As long as the player is in either of those states, they cannot move.
Assuming player
is the player struct of the player in question, their current state duration is stored in player.mo.tics
. Check if the player object's state is equal to one of the above states, and if it is, set the above variable to 1 to immediately make the game move on to the next state.
If this is for a specific character, of course, make sure the player is using that character beforehand!
EDIT: Alternatively, you can outright override their state back to the standing state!
EDIT 2: ...There is another part to it, however: the game sets the player's weapondelay
to signify a forced half-second cooldown. Make sure to reset that to 0 as well.