From dbbfd3ab5df0a1105fad82eced8c3da5eb5110d2 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 22 Aug 2011 21:42:02 +0200 Subject: [PATCH] try preventing weapon switching a more sensible way. Should work well with NIX that way. --- qcsrc/server/w_hagar.qc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index adfd15de86..a27bdac8f0 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -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; } -- 2.39.2