From: terencehill Date: Mon, 25 May 2020 12:19:49 +0000 (+0200) Subject: Make sure casing physics isn't run if the casing isn't visible. This change should... X-Git-Tag: xonotic-v0.8.5~1029 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a843c6c8b413aa9efb0b3acedded0050ed47490;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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"));