]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure casing physics isn't run if the casing isn't visible. This change should...
authorterencehill <piuntn@gmail.com>
Mon, 25 May 2020 12:19:49 +0000 (14:19 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 May 2020 12:19:49 +0000 (14:19 +0200)
qcsrc/common/effects/qc/casings.qc

index 359d3d8a532641c82a189b7d37855d1ec6293b3d..d07557f9ac011be83a17d6cd2aacaa74bce1a1bb 100644 (file)
@@ -62,10 +62,6 @@ void Casing_Draw(entity this)
         //UNSET_ONGROUND(this);
     }
 
-    Movetype_Physics_MatchTicrate(this, autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy);
-    if (wasfreed(this))
-        return; // deleted by touch function
-
     this.renderflags = 0;
     this.alpha = bound(0, this.cnt - time, 1);
 
@@ -73,7 +69,12 @@ void Casing_Draw(entity this)
     {
         Casing_Delete(this);
         this.drawmask = 0;
+        return;
     }
+
+    Movetype_Physics_MatchTicrate(this, autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy);
+    //if (wasfreed(this))
+    //    return; // deleted by touch function
 }
 
 SOUND(BRASS1, W_Sound("brass1"));