mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +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)
|
void SCR_DisplayLocalPing(void)
|
||||||
{
|
{
|
||||||
boolean offline;
|
// Splitscreen party has its own ping counter, but show the
|
||||||
|
// 1P version anyway in some cases:
|
||||||
UINT32 ping = playerpingtable[consoleplayer]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
|
// - On intermission, vote, etc. gamestates where the player
|
||||||
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
|
// 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;
|
return;
|
||||||
offline = (consoleplayer == serverplayer);
|
|
||||||
HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, V_SNAPTORIGHT | V_SNAPTOBOTTOM, offline, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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