]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix Ammunitioning nade spawning many particles
authorLegendaryGuard <rootuser999@gmail.com>
Tue, 16 Feb 2021 18:45:52 +0000 (19:45 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Tue, 16 Feb 2021 18:45:52 +0000 (19:45 +0100)
qcsrc/common/mutators/mutator/nades/nades.qc

index 0818c9ca4da3d9ddbddb14a9097ff000fbc04a03..6025c72238d410e634ce467447dcb79838db15ea 100644 (file)
@@ -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 )
                {