From 274e31155a8d146f2b8c990631c697642d73935c Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 19 Apr 2016 20:14:10 +0200 Subject: [PATCH] Small optimization --- qcsrc/client/hud/panel/weapons.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 5af7cce48..52fcc549a 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -344,7 +344,6 @@ void HUD_Weapons() // retrieve information about the current weapon to be drawn entity it = weaponorder[i]; weapon_id = it.impulse; - isCurrent = (it == switchweapon); // skip if this weapon doesn't exist if(!it || weapon_id < 0) { continue; } @@ -367,6 +366,7 @@ void HUD_Weapons() noncurrent_pos.y = weapon_pos.y + (weapon_size.y - noncurrent_size.y) / 2; // draw background behind currently selected weapon + isCurrent = (it == switchweapon); if(isCurrent) drawpic_aspect_skin(weapon_pos, "weapon_current_bg", weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); -- 2.39.2