]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
casings: if they got removed by a touch function, abort the draw handler
authorRudolf Polzer <divverent@alientrap.org>
Sun, 22 Jan 2012 14:57:04 +0000 (15:57 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 22 Jan 2012 14:57:04 +0000 (15:57 +0100)
qcsrc/client/casings.qc

index 1e2d4fbd8c92a3e1cec90f6710e16ba9a1cb2b15..d4d1041c80b5b2bfb63cbf1208021b9cb3ad55af 100644 (file)
@@ -15,6 +15,8 @@ void Casing_Draw()
        }
 
        Movetype_Physics_MatchTicrate(autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy);
+       if(wasfreed(self))
+               return; // deleted by touch function
 
        self.renderflags = 0;
        self.alpha = bound(0, self.cnt - time, 1);