From: terencehill Date: Tue, 8 Aug 2023 13:01:51 +0000 (+0200) Subject: Don't enable status effects that would end one frame after their creation, e.g. spawn... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3c645bcaa1b862088ce7a2b20ed5d1e90fdc7a3f;p=xonotic%2Fxonotic-data.pk3dir.git Don't enable status effects that would end one frame after their creation, e.g. spawnshield if g_spawnshieldtime is 0 --- 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); }