Adds numplayers client global as it will also be used in Scoreboard_Draw().
Slightly increases default timer panel width.
seta hud_panel_notify_fadetime "3"
seta hud_panel_notify_icon_aspect "1"
-seta hud_panel_timer_pos "0.455000 0"
-seta hud_panel_timer_size "0.090000 0.050000"
+seta hud_panel_timer_pos "0.450000 0"
+seta hud_panel_timer_size "0.100000 0.050000"
seta hud_panel_timer_bg "border_plain_north"
seta hud_panel_timer_bg_color ""
seta hud_panel_timer_bg_color_team ""
seta hud_panel_notify_icon_aspect "2"
seta hud_panel_timer_pos "0.790000 0.040000"
-seta hud_panel_timer_size "0.090000 0.050000"
+seta hud_panel_timer_size "0.100000 0.050000"
seta hud_panel_timer_bg "border_small_timer"
seta hud_panel_timer_bg_color ""
seta hud_panel_timer_bg_color_team ""
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)
{
#pragma once
#include "../panel.qh"
+#include "scoreboard.qh" // for Scoreboard_UpdatePlayerTeams()
bool autocvar_hud_panel_infomessages;
bool autocvar_hud_panel_infomessages_dynamichud = false;
update_time = time;
entity pl, tmp;
+ numplayers = 0;
//int num = 0;
for(pl = players.sort_next; pl; pl = pl.sort_next)
{
+ numplayers += pl.team != NUM_SPECTATOR;
//num += 1;
int Team = entcs_GetScoreTeam(pl.sv_entnum);
if(SetTeam(pl, Team))
float scoreboard_left;
float scoreboard_right;
+int numplayers;
+
void Cmd_Scoreboard_SetFields(int argc);
void Scoreboard_Draw();
void Scoreboard_InitScores();
#include "timer.qh"
+#include "scoreboard.qh"
#include <client/draw.qh>
#include <client/view.qh>
int overtimes = STAT(OVERTIMES);
if(warmup_stage || autocvar__hud_configure)
- subtext = _("Warmup");
+ {
+ if (STAT(WARMUP_TIMELIMIT) > 0)
+ subtext = _("Warmup");
+ else
+ subtext = srv_minplayers ? _("Warmup: too few players") : _("Warmup: no time limit");
+ }
else if(STAT(TIMEOUT_STATUS) == 2)
subtext = _("Timeout");
else if (overtimes == -1)