From: bones_was_here Date: Sat, 24 Dec 2022 11:42:32 +0000 (+1000) Subject: Reduce overhead when deleting casings X-Git-Tag: xonotic-v0.8.6~235^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55fc191b0c3655f10c2ac566586d65b1252e6a94;p=xonotic%2Fxonotic-data.pk3dir.git Reduce overhead when deleting casings --- diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index 93476a322..28789ff29 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -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; }