]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reduce overhead when deleting casings
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 24 Dec 2022 11:42:32 +0000 (21:42 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 24 Dec 2022 11:42:32 +0000 (21:42 +1000)
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;
     }