From 55fc191b0c3655f10c2ac566586d65b1252e6a94 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 24 Dec 2022 21:42:32 +1000 Subject: [PATCH] Reduce overhead when deleting casings --- qcsrc/common/effects/qc/casings.qc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.2