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 359d3d8..d07557f 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"));