From d86d52abd6d593921af6a2dc293173bf218184e7 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 20 Mar 2022 14:29:00 +0100 Subject: [PATCH] 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 --- qcsrc/common/mutators/mutator/instagib/sv_instagib.qc | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.2