mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 03:41:15 +00:00
SERVER: Prohibit Melee lunging while not Standing
This commit is contained in:
parent
68bfc0f695
commit
7d4ccdea60
1 changed files with 6 additions and 1 deletions
|
@ -1225,6 +1225,7 @@ void () W_Knife =
|
||||||
float r, backupSkin;
|
float r, backupSkin;
|
||||||
vector org;
|
vector org;
|
||||||
float hit = false;
|
float hit = false;
|
||||||
|
float applied_velocity;
|
||||||
|
|
||||||
if (self.sprinting) {
|
if (self.sprinting) {
|
||||||
W_SprintStop();
|
W_SprintStop();
|
||||||
|
@ -1295,7 +1296,7 @@ void () W_Knife =
|
||||||
self.reload_delay2 = self.fire_delay2 = self.reload_delay = self.fire_delay = time + 0.8;
|
self.reload_delay2 = self.fire_delay2 = self.reload_delay = self.fire_delay = time + 0.8;
|
||||||
self.knife_delay = time + 1.1;
|
self.knife_delay = time + 1.1;
|
||||||
}
|
}
|
||||||
self.velocity = v_forward * r * 6;
|
applied_velocity = v_forward * r * 6;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1324,6 +1325,10 @@ void () W_Knife =
|
||||||
}
|
}
|
||||||
self.reload_delay2 = self.reload_delay = 0;
|
self.reload_delay2 = self.reload_delay = 0;
|
||||||
self.weaponskin = backupSkin;
|
self.weaponskin = backupSkin;
|
||||||
|
|
||||||
|
// Prohibit any sort of melee lunge while not standing
|
||||||
|
if (self.stance != PLAYER_STANCE_STAND)
|
||||||
|
self.velocity = applied_velocity;
|
||||||
|
|
||||||
LungeKnifeHit();
|
LungeKnifeHit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue