]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/gibs.qc
Merge remote branch 'refs/remotes/origin/fruitiex/racefixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / gibs.qc
index 67951fc3c3a021baf23b49a65a48fed92ef29ba2..86b970c1a1fa1cf8334b8134383e002d1416450d 100644 (file)
@@ -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,14 @@ void Ent_GibSplash(float isNew)
        org_z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
-       if(cvar("cl_gentle"))
+       if(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
                type |= 0x80; // set gentle bit
 
        if(type & 0x80)
        {
-               if(cvar("cl_gentle") == 2)
+               if(autocvar_cl_gentle_gibs == 2)
                        gentle_prefix = "";
-               else if(cvar("cl_gentle") == 3) 
+               else if(autocvar_cl_gentle_gibs == 3) 
                        gentle_prefix = "happy_";
                else
                        gentle_prefix = "morphed_";
@@ -169,7 +171,7 @@ void Ent_GibSplash(float isNew)
                gentle_prefix = "particlegibs_";
        }
 
-       if not(cvar("cl_gentle"))
+       if not(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
                amount *= 1 - cvar("cl_nogibs");
 
        if(cvar("ekg"))