mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
SCR_DisplayLocalPing: show, even in splitscreen, in gamestates where player HUD is not drawn or when menu is opened
This commit is contained in:
parent
dd1b0255f8
commit
989ee48ef8
1 changed files with 20 additions and 7 deletions
27
src/screen.c
27
src/screen.c
|
|
@ -568,15 +568,28 @@ void SCR_DisplayTicRate(void)
|
|||
|
||||
void SCR_DisplayLocalPing(void)
|
||||
{
|
||||
boolean offline;
|
||||
|
||||
UINT32 ping = playerpingtable[consoleplayer]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
|
||||
if (! r_splitscreen && ( cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping) )) // only show 2 (warning) if our ping is at a bad level
|
||||
// Splitscreen party has its own ping counter, but show the
|
||||
// 1P version anyway in some cases:
|
||||
// - On intermission, vote, etc. gamestates where the player
|
||||
// HUD is not drawn.
|
||||
// - If the menu is opened, since it draws over the player
|
||||
// HUD.
|
||||
if (r_splitscreen && gamestate == GS_LEVEL && !menuactive)
|
||||
{
|
||||
INT32 dispy = cv_ticrate.value ? 160 : 181;
|
||||
offline = (consoleplayer == serverplayer);
|
||||
HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, V_SNAPTORIGHT | V_SNAPTOBOTTOM, offline, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
UINT32 ping = playerpingtable[consoleplayer];
|
||||
|
||||
if (cv_showping.value == 2 && ping <= servermaxping) // only show 2 (warning) if our ping is at a bad level
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
INT32 dispy = cv_ticrate.value ? 160 : 181;
|
||||
boolean offline = (consoleplayer == serverplayer);
|
||||
|
||||
HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, V_SNAPTORIGHT | V_SNAPTOBOTTOM, offline, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue