From 2da426d9eec77e9745e8c80c6891dd226799c9b8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 13 Jul 2023 15:25:08 +0200 Subject: [PATCH] Optimize MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) when nades aren't enabled --- qcsrc/common/mutators/mutator/nades/nades.qc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 9bd553337..3ca3eb69f 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -92,6 +92,8 @@ MUTATOR_HOOKFUNCTION(cl_nades, Ent_Projectile) } MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) { + if (!mut_is_active(MUT_NADES)) return; + entity proj = M_ARGV(0, entity); if (proj.cnt == PROJECTILE_NAPALM_FOUNTAIN) @@ -103,6 +105,7 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) entity nade_type = Nade_FromProjectile(proj.cnt); if (nade_type == NADE_TYPE_Null) return; + if(STAT(NADES_SMALL)) { proj.mins = '-8 -8 -8'; -- 2.39.2