From 1a843c6c8b413aa9efb0b3acedded0050ed47490 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 25 May 2020 14:19:49 +0200 Subject: [PATCH] Make sure casing physics isn't run if the casing isn't visible. This change should also prevent weird cases where for unknown reasons casing physics is run long after casing spawn, possible cause of #1925 --- qcsrc/common/effects/qc/casings.qc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index 359d3d8a5..d07557f9a 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -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")); -- 2.39.2