X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fgibs.qc;h=6f6e143934e39897f721d562d9a7a2dc4e77fe3e;hb=e04bfaf7ebbfc7dba0e2336eb37d69d612af276f;hp=f395fb6a7ba99cc8f07df85034c4a0126bfb366a;hpb=23f193f7d4f447db3cda320f704006adca177780;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index f395fb6a7..6f6e14393 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -97,9 +97,10 @@ void Gib_Draw() self.alpha = bound(0, self.nextthink - time, 1); if(self.alpha < ALPHA_MIN_VISIBLE) + { + self.drawmask = 0; Gib_Delete(); - else - R_AddEntity(self); + } } void TossGib (string mdlname, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent) @@ -130,6 +131,7 @@ void TossGib (string mdlname, vector org, vector vconst, vector vrand, float spe gib.damageforcescale = cvar_or("cl_gibs_damageforcescale", 3.5); gib.nextthink = time + cvar_or("cl_gibs_lifetime", 14) * (1 + prandom() * 0.15); + gib.drawmask = MASK_NORMAL; RubbleLimit("gib", cvar_or("cl_gibs_maxcount",100), Gib_Delete); } @@ -151,14 +153,15 @@ void Ent_GibSplash(float isNew) org_z = ReadShort() * 4 + 2; vel = decompressShortVector(ReadShort()); - if(cvar("cl_gentle_gibs") || cvar("cl_gentle")) + float cl_gentle_gibs = cvar("cl_gentle_gibs"); + if(cl_gentle_gibs || cvar("cl_gentle")) type |= 0x80; // set gentle bit if(type & 0x80) { - if(cvar("cl_gentle_gibs") == 2) + if(cl_gentle_gibs == 2) gentle_prefix = ""; - else if(cvar("cl_gentle_gibs") == 3) + else if(cl_gentle_gibs == 3) gentle_prefix = "happy_"; else gentle_prefix = "morphed_"; @@ -169,7 +172,7 @@ void Ent_GibSplash(float isNew) gentle_prefix = "particlegibs_"; } - if not(cvar("cl_gentle_gibs") || cvar("cl_gentle")) + if not(cl_gentle_gibs || cvar("cl_gentle")) amount *= 1 - cvar("cl_nogibs"); if(cvar("ekg"))