]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/casings.qc
speed up more csqc ent drawing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / casings.qc
index e8e3073b80b02d6d1b9292d96820b9d28c71e3d5..348e4a1a6ebefd8b2820168fe2b65a2616a20d81 100644 (file)
@@ -20,9 +20,10 @@ void Casing_Draw()
        self.alpha = bound(0, self.cnt - time, 1);
 
        if(self.alpha < ALPHA_MIN_VISIBLE)
        self.alpha = bound(0, self.cnt - time, 1);
 
        if(self.alpha < ALPHA_MIN_VISIBLE)
+       {
                Casing_Delete();
                Casing_Delete();
-       else
-               R_AddEntity(self);
+               self.drawmask = 0;
+       }
 }
 
 void Casing_Touch()
 }
 
 void Casing_Touch()
@@ -85,6 +86,7 @@ void Ent_Casing(float isNew)
        casing.angles_x = ReadByte() * 360 / 256;
        casing.angles_y = ReadByte() * 360 / 256;
        casing.angles_z = ReadByte() * 360 / 256;
        casing.angles_x = ReadByte() * 360 / 256;
        casing.angles_y = ReadByte() * 360 / 256;
        casing.angles_z = ReadByte() * 360 / 256;
+       casing.drawmask = MASK_NORMAL;
 
        if(cvar("cl_casings") && isNew) {
                casing.draw = Casing_Draw;
 
        if(cvar("cl_casings") && isNew) {
                casing.draw = Casing_Draw;