From: terencehill Date: Sun, 20 Mar 2022 13:29:00 +0000 (+0100) Subject: Fix instagib bug where ammo pickups give nothing if the player has no ammo. This... X-Git-Tag: xonotic-v0.8.5~147 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d86d52abd6d593921af6a2dc293173bf218184e7;p=xonotic%2Fxonotic-data.pk3dir.git Fix instagib bug where ammo pickups give nothing if the player has no ammo. This bug was introduced by 6d997e7e when M_ARGV(1, float) was changed to M_ARGV(1, entity) in *Resource functions --- diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index 2abb0b596..f6a393b9b 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -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; }