From: Mario Date: Sun, 9 Jun 2013 04:54:16 +0000 (+1000) Subject: Add some more checks to make sure nades don't use hook key when the hook weapon is... X-Git-Tag: xonotic-v0.8.0~366^2~25^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8d652b54cbb1450b40ea4d815933bc7bd8e16079;p=xonotic%2Fxonotic-data.pk3dir.git Add some more checks to make sure nades don't use hook key when the hook weapon is available --- diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index f3a1d65d6..36a5cab21 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -289,7 +289,7 @@ MUTATOR_HOOKFUNCTION(nades_VehicleEnter) MUTATOR_HOOKFUNCTION(nades_PlayerPreThink) { - float key_pressed = ((g_grappling_hook) ? self.button16 : self.BUTTON_HOOK); + float key_pressed = ((g_grappling_hook || client_hasweapon(self, WEP_HOOK, FALSE, FALSE) || WEPSET_CONTAINS_AW(weaponsInMap, WEP_HOOK)) ? self.button16 : self.BUTTON_HOOK); if(self.nade) if(self.nade.wait - 0.1 <= time)