From: terencehill Date: Thu, 13 Jul 2023 13:25:08 +0000 (+0200) Subject: Optimize MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) when nades aren't enabled X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2da426d9eec77e9745e8c80c6891dd226799c9b8;p=xonotic%2Fxonotic-data.pk3dir.git Optimize MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) when nades aren't enabled --- 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';