]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove wrong unlimited ammo check in Hook attack code, it should be checked in W_Decr...
authorterencehill <piuntn@gmail.com>
Sun, 20 Mar 2011 22:36:09 +0000 (23:36 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 20 Mar 2011 22:36:09 +0000 (23:36 +0100)
qcsrc/server/w_hook.qc

index c3a1768beb0ab9335031a8762284292ca8711cea..80c40b10fd8704cc94f46ec2640d30fafc1f834c 100644 (file)
@@ -62,8 +62,7 @@ void W_Hook_Attack2()
 {
        local entity gren;
 
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-               W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE);
+       W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE);
        W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, autocvar_g_balance_hook_secondary_damage);
 
        gren = spawn ();
@@ -126,8 +125,7 @@ float w_hook(float req)
                        if (time > self.hook_refire)
                        if (weapon_prepareattack(0, -1))
                        {
-                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-                                       W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
+                               W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
                                self.hook_state |= HOOK_FIRING;
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hook_primary_animtime, w_ready);                         
                        }