mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 05:41:20 +00:00
Server: Call W_SprintStop() before preparing to use equipment
Fixes https://github.com/nzp-team/nzportable/issues/58 and also prevents being able to exploit sprinting while holding a grenade.
This commit is contained in:
parent
b74c6cd8c8
commit
8257107fea
1 changed files with 10 additions and 0 deletions
|
@ -1966,6 +1966,11 @@ void() W_Betty = {
|
|||
if (self.throw_delay > time || self.zoom || self.downed || self.secondary_grenades < 1 || self.isBuying)
|
||||
return;
|
||||
|
||||
// Prevent the Player from Sprinting and also avoid issues with
|
||||
// the equipment being completely cancelled..
|
||||
if (self.sprinting)
|
||||
W_SprintStop();
|
||||
|
||||
Set_W_Frame (0, 18, 0, 0, GRENADE, checkHoldB, "models/weapons/grenade/v_betty.mdl", true, S_RIGHT);
|
||||
sound (self, CHAN_WEAPON, "sounds/weapons/grenade/prime.wav", 1, ATTN_NORM);
|
||||
self.secondary_grenades -= 1;
|
||||
|
@ -1978,6 +1983,11 @@ void() W_Grenade =
|
|||
if (self.throw_delay > time || self.zoom || self.downed || self.primary_grenades < 1 || self.isBuying)
|
||||
return;
|
||||
|
||||
// Prevent the Player from Sprinting and also avoid issues with
|
||||
// the equipment being completely cancelled..
|
||||
if (self.sprinting)
|
||||
W_SprintStop();
|
||||
|
||||
Set_W_Frame (0, 2, 0, 0, GRENADE, checkHold, "models/weapons/grenade/v_grenade.mdl", true, S_RIGHT);
|
||||
sound (self, CHAN_WEAPON, "sounds/weapons/grenade/prime.wav", 1, ATTN_NORM);
|
||||
self.primary_grenades -= 1;
|
||||
|
|
Loading…
Reference in a new issue