]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Return if the damage text is deleted
authorMario <mario@smbclan.net>
Thu, 22 Jun 2017 22:22:44 +0000 (08:22 +1000)
committerMario <mario@smbclan.net>
Thu, 22 Jun 2017 22:22:59 +0000 (08:22 +1000)
qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc

index daf538cb30bbe7f78751763530d628f88ecec979..1eb7396332d493daffb81a6e883021c5189cbb0b 100644 (file)
@@ -49,7 +49,11 @@ CLASS(DamageText, Object)
         this.time_prev = time;
         setorigin(this, this.origin + dt * this.velocity);
         this.alpha -= dt * this.fade_rate;
-        if (this.alpha < 0) delete(this);
+        if (this.alpha < 0)
+        {
+            delete(this);
+            return;
+        }
         vector pos = project_3d_to_2d(this.origin) + autocvar_cl_damagetext_offset;
         if (pos.z >= 0 && this.m_size > 0) {
             pos.z = 0;