mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 05:41:20 +00:00
SERVER: Add a sprint delay when taking damage
This commit is contained in:
parent
5b94ecb5f8
commit
a8ae0a96fc
1 changed files with 9 additions and 0 deletions
|
@ -520,6 +520,15 @@ void(entity victim,entity attacker, float damage, float d_style) DamageHandler =
|
|||
else
|
||||
sound (self, CHAN_AUTO, "sounds/machines/elec_shock.wav", 1, ATTN_NORM);
|
||||
|
||||
if (victim.sprinting) {
|
||||
old_self = self;
|
||||
self = victim;
|
||||
W_SprintStop();
|
||||
self = old_self;
|
||||
}
|
||||
|
||||
victim.sprint_delay = time + 0.75;
|
||||
|
||||
// Was 20 for.. some reason.
|
||||
if (victim.health <= 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue