From: FruitieX <fruitiex@gmail.com>
Date: Wed, 15 Dec 2010 12:42:20 +0000 (+0200)
Subject: to terencehill: please be more careful with your optimizations and what they cause... 
X-Git-Tag: xonotic-v0.5.0~348^2~2
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f36a4689b5f9c4ff82e285e27f4545d1b59f168c;p=xonotic%2Fxonotic-data.pk3dir.git

to terencehill: please be more careful with your optimizations and what they cause, this for instance broke highlighting in some cases
---

diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc
index 943755c1fb..e52d136c72 100644
--- a/qcsrc/client/hud.qc
+++ b/qcsrc/client/hud.qc
@@ -1688,8 +1688,8 @@ void HUD_Weapons(void)
 		if(!autocvar_hud_panel_weapons) return;
 		if(spectatee_status == -1) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_WEAPONS;
+
+    hud_configure_active_panel = HUD_PANEL_WEAPONS;
 
 	float timeout = autocvar_hud_panel_weapons_timeout;
 	float timeout_effect_length, timein_effect_length;
@@ -2098,8 +2098,8 @@ void HUD_Ammo(void)
 		if(!autocvar_hud_panel_ammo) return;
 		if(spectatee_status == -1) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_AMMO;
+
+    hud_configure_active_panel = HUD_PANEL_AMMO;
 
 	HUD_Panel_UpdateCvars(ammo);
 	vector pos, mySize;
@@ -2282,12 +2282,12 @@ void HUD_Powerups(void)
 	}
 	else
 	{
-		hud_configure_active_panel = HUD_PANEL_POWERUPS;
-
 		strength_time = 15;
 		shield_time = 27;
 	}
 
+    hud_configure_active_panel = HUD_PANEL_POWERUPS;
+
 	HUD_Panel_UpdateCvars(powerups);
 	vector pos, mySize;
 	pos = panel_pos;
@@ -2429,13 +2429,13 @@ void HUD_HealthArmor(void)
 	}
 	else
 	{
-		hud_configure_active_panel = HUD_PANEL_HEALTHARMOR;
-
 		health = 150;
 		armor = 75;
 		fuel = 20;
 	}
 
+    hud_configure_active_panel = HUD_PANEL_HEALTHARMOR;
+
 	HUD_Panel_UpdateCvars(healtharmor);
 	vector pos, mySize;
 	pos = panel_pos;
@@ -3118,8 +3118,8 @@ void HUD_Notify (void)
 	{
 		if(!autocvar_hud_panel_notify) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_NOTIFY;
+
+    hud_configure_active_panel = HUD_PANEL_NOTIFY;
 
 	HUD_Panel_UpdateCvars(notify);
 	vector pos, mySize;
@@ -3434,8 +3434,8 @@ void HUD_Timer(void)
 	{
 		if(!autocvar_hud_panel_timer) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_TIMER;
+
+    hud_configure_active_panel = HUD_PANEL_TIMER;
 
 	HUD_Panel_UpdateCvars(timer);
 	vector pos, mySize;
@@ -3493,8 +3493,8 @@ void HUD_Radar(void)
 		if (autocvar_hud_panel_radar == 0) return;
 		if (autocvar_hud_panel_radar != 2 && !teamplay) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_RADAR;
+
+    hud_configure_active_panel = HUD_PANEL_RADAR;
 
 	HUD_Panel_UpdateCvars(radar);
 	vector pos, mySize;
@@ -3621,8 +3621,8 @@ void HUD_Score(void)
 	{
 		if(!autocvar_hud_panel_score) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_SCORE;
+
+    hud_configure_active_panel = HUD_PANEL_SCORE;
 
 	HUD_Panel_UpdateCvars(score);
 	vector pos, mySize;
@@ -3888,8 +3888,8 @@ void HUD_RaceTimer (void)
 		if(!(gametype == GAME_RACE || gametype == GAME_CTS)) return;
 		if(spectatee_status == -1) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_RACETIMER;
+
+    hud_configure_active_panel = HUD_PANEL_RACETIMER;
 
 	HUD_Panel_UpdateCvars(racetimer);
 	vector pos, mySize;
@@ -4067,13 +4067,13 @@ void HUD_VoteWindow(void)
 	}
 	else
 	{
-		hud_configure_active_panel = HUD_PANEL_VOTE;
-
 		vote_yescount = 3;
 		vote_nocount = 2;
 		vote_needed = 4;
 	}
 
+    hud_configure_active_panel = HUD_PANEL_VOTE;
+
 	string s;
 	float a;
 	if(vote_active != vote_prev) {
@@ -4840,8 +4840,8 @@ void HUD_ModIcons(void)
 		if(!autocvar_hud_panel_modicons) return;
 		if (gametype != GAME_CTF && gametype != GAME_KEYHUNT && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_CA && gametype != GAME_FREEZETAG && gametype != GAME_KEEPAWAY && gametype != GAME_DOMINATION) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_MODICONS;
+
+    hud_configure_active_panel = HUD_PANEL_MODICONS;
 
 	HUD_Panel_UpdateCvars(modicons);
 	vector pos, mySize;
@@ -4893,9 +4893,8 @@ void HUD_DrawPressedKeys(void)
 		if(!autocvar_hud_panel_pressedkeys) return;
 		if(spectatee_status <= 0 && autocvar_hud_panel_pressedkeys < 2) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_PRESSEDKEYS;
 
+    hud_configure_active_panel = HUD_PANEL_PRESSEDKEYS;
 
 	HUD_Panel_UpdateCvars(pressedkeys);
 	vector pos, mySize;
@@ -4958,8 +4957,8 @@ void HUD_Chat(void)
 			return;
 		}
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_CHAT;
+
+    hud_configure_active_panel = HUD_PANEL_CHAT;
 
 	HUD_Panel_UpdateCvars(chat);
 
@@ -5033,8 +5032,8 @@ void HUD_EngineInfo(void)
 	{
 		if(!autocvar_hud_panel_engineinfo) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_ENGINEINFO;
+
+    hud_configure_active_panel = HUD_PANEL_ENGINEINFO;
 
 	HUD_Panel_UpdateCvars(engineinfo);
 	vector pos, mySize;
@@ -5097,8 +5096,8 @@ void HUD_InfoMessages(void)
 	{
 		if(!autocvar_hud_panel_infomessages) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_INFOMESSAGES;
+
+    hud_configure_active_panel = HUD_PANEL_INFOMESSAGES;
 
 	HUD_Panel_UpdateCvars(infomessages);
 	vector pos, mySize;
@@ -5284,8 +5283,8 @@ void HUD_Physics(void)
 	{
 		if(!autocvar__hud_configure) return;
 	}
-	else
-		hud_configure_active_panel = HUD_PANEL_PHYSICS;
+
+    hud_configure_active_panel = HUD_PANEL_PHYSICS;
 
 	HUD_Panel_UpdateCvars(physics);