From: terencehill Date: Thu, 12 May 2011 20:54:08 +0000 (+0200) Subject: Declare weapon_cnt just where it's used to avoid possible confusion with weapon_count X-Git-Tag: xonotic-v0.6.0~40^2~118^2~18^2~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7766418aefbf1e7c90bb5bcfebf40891123c3b85;p=xonotic%2Fxonotic-data.pk3dir.git Declare weapon_cnt just where it's used to avoid possible confusion with weapon_count --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 7924c2983..a3926d012 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -734,11 +734,10 @@ void HUD_Weapons(void) } } - float weapid, wpnalpha, weapon_cnt; - // TODO make this configurable if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0]) { + float weapon_cnt; if(weaponorder_bypriority) strunzone(weaponorder_bypriority); if(weaponorder_byimpulse) @@ -772,6 +771,8 @@ void HUD_Weapons(void) panel_size -= '2 2 0' * panel_bg_padding; } + float weapid, wpnalpha; + if(autocvar_hud_panel_weapons_fade) { wpnalpha = 3.2 - 2 * (time - weapontime);