From: Mircea Kitsune Date: Mon, 11 Apr 2011 15:34:04 +0000 (+0300) Subject: Force switch to another weapon when out of ammo (needs to be done separately here) X-Git-Tag: xonotic-v0.5.0~263^2~10^2~64 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4d9494bad9bda5e0a9db48b452e409167bfb806d;p=xonotic%2Fxonotic-data.pk3dir.git Force switch to another weapon when out of ammo (needs to be done separately here) --- diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index f6b5a61e4..711afe9d0 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -119,6 +119,11 @@ void W_Hagar_Attack2 (void) void W_Hagar_Attack2_Load (void) { + if not(weapon_action(self.weapon, WR_CHECKAMMO2)) + { + W_SwitchToOtherWeapon(self); + return; + } if not(autocvar_g_balance_hagar_secondary) return;