]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't enable status effects that would end one frame after their creation, e.g. spawn...
authorterencehill <piuntn@gmail.com>
Tue, 8 Aug 2023 13:01:51 +0000 (15:01 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 8 Aug 2023 13:01:51 +0000 (15:01 +0200)
qcsrc/common/mutators/mutator/status_effects/status_effects.qc

index eb1ced075d17c3643e5b260044c05d21f7191c33..5775032440a83c7144b73dccdb80d9ba9daa9966 100644 (file)
@@ -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);
 }