]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
try preventing weapon switching a more sensible way. Should work well with NIX that...
authorRudolf Polzer <divVerent@xonotic.org>
Mon, 22 Aug 2011 19:42:02 +0000 (21:42 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 22 Aug 2011 19:42:02 +0000 (21:42 +0200)
qcsrc/server/w_hagar.qc

index adfd15de86a084ec4d32c805f23d22a69f1721c0..a27bdac8f06449b7347128b874a16c1a30306e18 100644 (file)
@@ -242,17 +242,20 @@ void W_Hagar_Attack2_Load (void)
 
        if(self.hagar_load)
        {
+               self.weaponentity.state = WS_INUSE; // prevents weapon switching
                if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && !autocvar_g_balance_hagar_secondary_load_hold))
                        W_Hagar_Attack2_Load_Release();
        }
        else
        {
+               self.weaponentity.state = WS_READY; // allows weapon switching
                self.hagar_loadbeep = FALSE;
        }
 
        // we aren't checking ammo during an attack, so we must do it here
        if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
        {
+               // note: this doesn't force the switch
                W_SwitchToOtherWeapon(self);
                return;
        }