From 3c645bcaa1b862088ce7a2b20ed5d1e90fdc7a3f Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 8 Aug 2023 15:01:51 +0200 Subject: [PATCH] Don't enable status effects that would end one frame after their creation, e.g. spawnshield if g_spawnshieldtime is 0 --- qcsrc/common/mutators/mutator/status_effects/status_effects.qc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/common/mutators/mutator/status_effects/status_effects.qc b/qcsrc/common/mutators/mutator/status_effects/status_effects.qc index eb1ced075..577503244 100644 --- a/qcsrc/common/mutators/mutator/status_effects/status_effects.qc +++ b/qcsrc/common/mutators/mutator/status_effects/status_effects.qc @@ -27,6 +27,9 @@ float StatusEffects_gettime(StatusEffects this, entity actor) #ifdef SVQC void StatusEffects_apply(StatusEffects this, entity actor, float eff_time, int eff_flags) { + if (!actor || eff_time <= time) + return; + this.m_apply(this, actor, eff_time, eff_flags); } -- 2.39.5