From 0692765b3fe9fd86ff7a1ea1d270259ad9f38506 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Tue, 16 Feb 2021 19:45:52 +0100 Subject: [PATCH] Fix Ammunitioning nade spawning many particles --- qcsrc/common/mutators/mutator/nades/nades.qc | 25 ++++---------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 0818c9ca4..6025c7223 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -807,48 +807,33 @@ void nade_ammo_touch(entity this, entity toucher) { if (amshells < maxammo) { - if (this.nade_show_particles) - { - Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); - } GiveResourceWithLimit(toucher, RES_SHELLS, ammo_factor, maxammo); } if (ambullets < maxammo) { - if (this.nade_show_particles) - { - Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); - } GiveResourceWithLimit(toucher, RES_BULLETS, ammo_factor, maxammo); } if (amrockets < maxammo) { - if (this.nade_show_particles) - { - Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); - } GiveResourceWithLimit(toucher, RES_ROCKETS, ammo_factor, maxammo); } if (amcells < maxammo) { - if (this.nade_show_particles) - { - Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); - } GiveResourceWithLimit(toucher, RES_CELLS, ammo_factor, maxammo); } if (amplasma < maxammo) { - if (this.nade_show_particles) - { - Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); - } GiveResourceWithLimit(toucher, RES_PLASMA, ammo_factor, maxammo); } + + if (this.nade_show_particles) + { + Send_Effect(EFFECT_HEALING, toucher.origin, '0 0 0', 1); + } } else if ( ammo_factor < 0 ) { -- 2.39.2