]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add some more checks to make sure nades don't use hook key when the hook weapon is...
authorMario <mario.mario@y7mail.com>
Sun, 9 Jun 2013 04:54:16 +0000 (14:54 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 9 Jun 2013 04:54:16 +0000 (14:54 +1000)
qcsrc/server/mutators/mutator_nades.qc

index f3a1d65d6e822f9da239b513713e4bd053802c22..36a5cab21363c7d5962e1b93794ac28fe8e741c3 100644 (file)
@@ -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)