]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix instagib bug where ammo pickups give nothing if the player has no ammo. This...
authorterencehill <piuntn@gmail.com>
Sun, 20 Mar 2022 13:29:00 +0000 (14:29 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 20 Mar 2022 13:29:00 +0000 (14:29 +0100)
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc

index 2abb0b5967483dcf11383b5b417bd367f89a6c29..f6a393b9bc3d782478e99e04e7d63b1843e77062 100644 (file)
@@ -396,6 +396,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
 
                if(hp < 100)
                        SetResource(toucher, RES_HEALTH, 100);
+               // work around SetResource overriding M_ARGV(1, entity)
+               M_ARGV(1, entity) = toucher;
 
                return MUT_ITEMTOUCH_CONTINUE;
        }