From: Mircea Kitsune Date: Sat, 22 Jan 2011 17:44:36 +0000 (+0200) Subject: skip non-reloadable weapons, or we access undefined cvars. Also a balance tweak X-Git-Tag: xonotic-v0.5.0~309^2~7^2~102 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f1a52f00feb729d77590fc54c01ec0f799d2938d;p=xonotic%2Fxonotic-data.pk3dir.git skip non-reloadable weapons, or we access undefined cvars. Also a balance tweak --- diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index e60aa20f1..03712f870 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -243,7 +243,7 @@ set g_balance_laser_secondary_gauntlet 1 set g_balance_laser_secondary_force_zscale 1.25 set g_balance_laser_secondary_force_velocitybias 0 set g_balance_laser_secondary_force_other_scale 0 -set g_balance_laser_reload_ammo 5 +set g_balance_laser_reload_ammo 6 set g_balance_laser_reload_time 2 // }}} // {{{ shotgun diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 5b444e7d1..2c160848d 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -932,6 +932,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) // might still be loaded. The reload code takes care of complaining and forced switching entity e; e = get_weaponinfo(wpn); + if(wpn != WEP_TUBA && wpn != WEP_PORTO && wpn != WEP_HOOK) // skip non-reloadable weapons, or we access undefined cvars if(cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) f = 1; @@ -1058,6 +1059,7 @@ float weapon_prepareattack_checkammo(float secondary) // might still be loaded. The reload code takes care of complaining and forced switching entity e; e = get_weaponinfo(self.weapon); + if(self.weapon != WEP_TUBA && self.weapon != WEP_PORTO && self.weapon != WEP_HOOK) // skip non-reloadable weapons, or we access undefined cvars if(cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) return FALSE;