From a8ae0a96fc22d647835be380cc520d150620abf1 Mon Sep 17 00:00:00 2001 From: cypress Date: Mon, 17 Jul 2023 15:13:05 -0400 Subject: [PATCH] SERVER: Add a sprint delay when taking damage --- source/server/damage.qc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/server/damage.qc b/source/server/damage.qc index d067756..c401ff3 100644 --- a/source/server/damage.qc +++ b/source/server/damage.qc @@ -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) {