From: Mircea Kitsune Date: Sat, 22 Jan 2011 17:03:21 +0000 (+0200) Subject: Properly check the weapon we are switching to X-Git-Tag: xonotic-v0.5.0~309^2~7^2~107 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=daaf48c4af64572bb3d97104ecb99eca92ec5d26;p=xonotic%2Fxonotic-data.pk3dir.git Properly check the weapon we are switching to --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index fd1da3162..5b444e7d1 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -931,7 +931,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) // allow switching to reloadable weapons, even if we're out of ammo, since the weapon itself // might still be loaded. The reload code takes care of complaining and forced switching entity e; - e = get_weaponinfo(self.switchweapon); + e = get_weaponinfo(wpn); if(cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) f = 1;