]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/casings.qc
Reduce overhead when deleting casings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / casings.qc
index 93476a3220075b8826b89256bdba9aa73a8d1f52..28789ff29e464328407c3b679e539b5bf099abe9 100644 (file)
@@ -57,6 +57,7 @@ classfield(Casing) .bool silent;
 classfield(Casing) .int state;
 classfield(Casing) .float cnt;
 
+// this is only needed because LimitedChildrenRubble() takes a func pointer
 void Casing_Delete(entity this)
 {
     delete(this);
@@ -76,7 +77,7 @@ void Casing_Draw(entity this)
 
     if (this.alpha < ALPHA_MIN_VISIBLE)
     {
-        Casing_Delete(this);
+        delete(this);
         this.drawmask = 0;
         return;
     }
@@ -103,7 +104,7 @@ void Casing_Touch(entity this, entity toucher)
 {
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
     {
-        Casing_Delete(this);
+        delete(this);
         return;
     }