Skip to content

Commit e061a49

Browse files
authored
Merge pull request #1013 from osm/add-scoreboard-showclock
Add scr_scoreboard_showclock
2 parents 0e5a0b6 + e5684e4 commit e061a49

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

help_variables.json

+15
Original file line numberDiff line numberDiff line change
@@ -19106,6 +19106,21 @@
1910619106
}
1910719107
]
1910819108
},
19109+
"scr_scoreboard_showclock": {
19110+
"default": "0",
19111+
"group-id": "47",
19112+
"type": "boolean",
19113+
"values": [
19114+
{
19115+
"description": "Hide the clock on the scoreboard.",
19116+
"name": "false"
19117+
},
19118+
{
19119+
"description": "Show the clock on the scoreboard.",
19120+
"name": "true"
19121+
}
19122+
]
19123+
},
1910919124
"scr_scoreboard_showfrags": {
1911019125
"default": "1",
1911119126
"group-id": "47",

src/sbar.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ cvar_t scr_scoreboard_proportional = {"scr_scoreboard_proportional", "0"};
143143
cvar_t scr_scoreboard_wipeout = {"scr_scoreboard_wipeout", "1"};
144144
cvar_t scr_scoreboard_classic = {"scr_scoreboard_classic", "0"};
145145
cvar_t scr_scoreboard_highlightself = {"scr_scoreboard_highlightself", "1"};
146+
cvar_t scr_scoreboard_showclock = {"scr_scoreboard_showclock", "0"};
146147

147148
// VFrags: only draw the frags for the first player when using mvinset
148149
#define MULTIVIEWTHISPOV() ((!cl_multiview.value) || (cl_mvinset.value && CL_MultiviewCurrentView() == 1))
@@ -334,6 +335,7 @@ void Sbar_Init(void)
334335
Cvar_Register(&scr_scoreboard_wipeout);
335336
Cvar_Register(&scr_scoreboard_classic);
336337
Cvar_Register(&scr_scoreboard_highlightself);
338+
Cvar_Register(&scr_scoreboard_showclock);
337339

338340
Cvar_ResetCurrentGroup();
339341

@@ -1236,7 +1238,7 @@ void Sbar_SoloScoreboard (void)
12361238
len = strlen (str);
12371239
Sbar_DrawString (160 - len*4, 4, str);
12381240
}
1239-
else
1241+
else if (scr_scoreboard_showclock.value)
12401242
{
12411243
strlcpy(str, SCR_GetTimeString(TIMETYPE_CLOCK, "%H:%M:%S"), sizeof(str));
12421244
Sbar_DrawString(160 - (strlen(str)*4), -10, str);

0 commit comments

Comments
 (0)