]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
allow to configure the hud when spectating, but still force a join when in the first...
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 29 Jun 2010 10:37:20 +0000 (13:37 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 29 Jun 2010 10:37:20 +0000 (13:37 +0300)
qcsrc/client/hud.qc
qcsrc/client/scoreboard.qc

index 7071f83c23b24ee8ba8ce5a94963b37c4a26296b..dac378fa719796dbd8b936e8a9009a1877849cd6 100644 (file)
@@ -4523,6 +4523,7 @@ void HUD_Reset (void)
                HUD_Mod_CTF_Reset();
 }
 
+float hud_configure_prev = -1;
 void HUD_Main (void)
 {
        if(disable_menu_alphacheck == 1)
@@ -4585,7 +4586,6 @@ void HUD_Main (void)
                HUD_VoteWindow();
        if(HUD_Panel_CheckActive(HUD_PANEL_MODICONS) || hud_configure)
                HUD_ModIcons();
-       // TODO hud'ify
        if(HUD_Panel_CheckActive(HUD_PANEL_PRESSEDKEYS) || hud_configure)
                if(spectatee_status > 0 || cvar("hud_pressedkeys") >= 2 || hud_configure)
                        HUD_DrawPressedKeys();
@@ -4602,9 +4602,11 @@ void HUD_Main (void)
        if (cvar("cl_showacceleration"))
                HUD_ShowAcceleration();
 
-       if (hud_configure && spectatee_status) // try to join if we are in hud_configure mode, but still spectating (in order to get rid of motd and such)
+       if (hud_configure && spectatee_status && hud_configure_prev == -1) // try to join if we are in hud_configure mode, but still spectating, and in the first frame (in order to get rid of motd when launching a server via the menu "HUD Setup" button)
                localcmd("cmd selectteam auto; cmd join\n");
 
+       hud_configure_prev = hud_configure;
+
        if (!hud_configure) // hud config mode disabled, enable normal alpha stuff again
                disable_menu_alphacheck = 0;
 }
index cd6ea9efebbc1a583f1baea8217737c92c467955..256e6ac9b0b071a6b9d2cb2098342497fc91b8dc 100644 (file)
@@ -870,7 +870,9 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 }
 
 float HUD_WouldDrawScoreboard() {
-       if (scoreboard_showscores)
+       if (hud_configure)
+               return 0;
+       else if (scoreboard_showscores)
                return 1;
        else if (intermission == 1)
                return 1;