]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/infomessages.qc
Cleanup obsolete warmup info messages
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / infomessages.qc
index 03465cce56185d26267368b5c6043f57a435fc0d..9db3bf72e2c3b017c7f40c07047c647af4bb8455 100644 (file)
@@ -1,9 +1,6 @@
 #include "infomessages.qh"
 
-#include <client/autocvars.qh>
-#include <client/main.qh>
-#include <client/miscfunctions.qh>
-
+#include <client/draw.qh>
 #include <common/ent_cs.qh>
 
 // Info messages (#14)
@@ -153,22 +150,21 @@ void HUD_InfoMessages()
                else
                        blinkcolor = "^3";
 
-               if(ready_waiting && !spectatee_status)
+               if(warmup_stage && STAT(WARMUP_TIMELIMIT) <= 0 && srv_minplayers)
+               {
+                       Scoreboard_UpdatePlayerTeams(); // ensure numplayers is current
+                       if(srv_minplayers - numplayers == 1)
+                               s = _("^31^2 more player is needed for the match to start.");
+                       else
+                               s = sprintf(_("^3%d^2 more players are needed for the match to start."), srv_minplayers - numplayers);
+                       InfoMessage(s);
+               }
+               else if(ready_waiting && !spectatee_status)
                {
                        if(ready_waiting_for_me)
-                       {
-                               if(warmup_stage)
-                                       s = sprintf(_("%sPress ^3%s%s to end warmup"), blinkcolor, getcommandkey(_("ready"), "ready"), blinkcolor);
-                               else
-                                       s = sprintf(_("%sPress ^3%s%s once you are ready"), blinkcolor, getcommandkey(_("ready"), "ready"), blinkcolor);
-                       }
+                               s = sprintf(_("%sPress ^3%s%s to end warmup"), blinkcolor, getcommandkey(_("ready"), "ready"), blinkcolor);
                        else
-                       {
-                               if(warmup_stage)
-                                       s = _("^2Waiting for others to ready up to end warmup...");
-                               else
-                                       s = _("^2Waiting for others to ready up...");
-                       }
+                               s = _("^2Waiting for others to ready up to end warmup...");
                        InfoMessage(s);
                }
                else if(warmup_stage && !spectatee_status)
@@ -197,7 +193,7 @@ void HUD_InfoMessages()
                                        s = strcat(blinkcolor, _("Teamnumbers are unbalanced!"));
                                        tm = GetTeam(myteam, false);
                                        if (tm && tm.team != NUM_SPECTATOR && tm.team_size == ts_max)
-                                               s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey(_("team menu"), "menu_showteamselect"), blinkcolor));
+                                               s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey(_("team selection"), "scoreboard_team_selection"), blinkcolor));
                                        InfoMessage(s);
                                }
                        }