mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-07 08:21:59 +00:00
Add the cl_showscoresuid cvar I mentioned before
This commit is contained in:
parent
a187032ebf
commit
4620b8fdfd
1 changed files with 19 additions and 5 deletions
|
@ -85,6 +85,7 @@ void Sbar_MiniDeathmatchOverlay (void);
|
||||||
|
|
||||||
static qboolean largegame = false;
|
static qboolean largegame = false;
|
||||||
|
|
||||||
|
cvar_t *cl_showscoresuid;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sbar_ShowTeamScores
|
Sbar_ShowTeamScores
|
||||||
|
@ -242,6 +243,9 @@ Sbar_Init (void)
|
||||||
sb_sbar = Draw_PicFromWad ("sbar");
|
sb_sbar = Draw_PicFromWad ("sbar");
|
||||||
sb_ibar = Draw_PicFromWad ("ibar");
|
sb_ibar = Draw_PicFromWad ("ibar");
|
||||||
sb_scorebar = Draw_PicFromWad ("scorebar");
|
sb_scorebar = Draw_PicFromWad ("scorebar");
|
||||||
|
|
||||||
|
cl_showscoresuid = Cvar_Get ("cl_showscoresuid", "0", CVAR_NONE, NULL,
|
||||||
|
"show uid instead of ping on scores");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -967,7 +971,10 @@ Sbar_DeathmatchOverlay (int start)
|
||||||
if (teamplay) {
|
if (teamplay) {
|
||||||
x = 4;
|
x = 4;
|
||||||
// 0 40 64 104 152 192
|
// 0 40 64 104 152 192
|
||||||
Draw_String8 (x, y, "ping pl time frags team name");
|
if (cl_showscoresuid->int_val == 0)
|
||||||
|
Draw_String8 (x, y, "ping pl time frags team name");
|
||||||
|
else
|
||||||
|
Draw_String8 (x, y, " uid pl time frags team name");
|
||||||
y += 8;
|
y += 8;
|
||||||
// Draw_String8 ( x , y, "---- -- ---- ----- ---- ----------------");
|
// Draw_String8 ( x , y, "---- -- ---- ----- ---- ----------------");
|
||||||
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
||||||
|
@ -977,7 +984,10 @@ Sbar_DeathmatchOverlay (int start)
|
||||||
} else {
|
} else {
|
||||||
x = 16;
|
x = 16;
|
||||||
// 0 40 64 104 152
|
// 0 40 64 104 152
|
||||||
Draw_String8 (x, y, "ping pl time frags name");
|
if (cl_showscoresuid->int_val == 0)
|
||||||
|
Draw_String8 (x, y, "ping pl time frags name");
|
||||||
|
else
|
||||||
|
Draw_String8 (x, y, " uid pl time frags name");
|
||||||
y += 8;
|
y += 8;
|
||||||
// Draw_String8 ( x , y, "---- -- ---- ----- ----------------");
|
// Draw_String8 ( x , y, "---- -- ---- ----- ----------------");
|
||||||
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
Draw_String8 (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
|
||||||
|
@ -993,9 +1003,13 @@ Sbar_DeathmatchOverlay (int start)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// draw ping
|
// draw ping
|
||||||
p = s->ping;
|
if (cl_showscoresuid->int_val == 0) { // hack to show userid
|
||||||
if (p < 0 || p > 999)
|
p = s->ping;
|
||||||
p = 999;
|
if (p < 0 || p > 999)
|
||||||
|
p = 999;
|
||||||
|
} else {
|
||||||
|
p = s->userid;
|
||||||
|
}
|
||||||
snprintf (num, sizeof (num), "%4i", p);
|
snprintf (num, sizeof (num), "%4i", p);
|
||||||
Draw_String8 (x, y, num);
|
Draw_String8 (x, y, num);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue