add gentlemens delay to ping display
+ display ping even offline if you have mindelay active
This commit is contained in:
1 parent
0a40a28c3d
commit
e1cfbd25fa
4 files changed
+40
-11
No files matched your search
+13
-3
@@ -2365,7 +2365,7 @@ void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags)
|
||||
UINT8 *colormap = NULL;
|
||||
INT32 measureid = cv_pingmeasurement.value ? 1 : 0;
|
||||
INT32 gfxnum; // gfx to draw
|
||||
|
||||
|
||||
//SRB2/Kart v1.0 style
|
||||
UINT8 numbars = 0; // how many ping bars do we draw?
|
||||
UINT8 barcolor = 31; // color we use for the bars (green, yellow, red or black)
|
||||
@@ -2462,6 +2462,7 @@ static inline void HU_DrawSpectatorTicker(void)
|
||||
INT32 length = 0, height = 174;
|
||||
INT32 totallength = 0, templength = -8;
|
||||
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
|
||||
UINT32 ping = 0;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].spectator)
|
||||
@@ -2535,8 +2536,17 @@ static inline void HU_DrawSpectatorTicker(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (netgame && i != serverplayer)
|
||||
HU_drawPing((templength - duptweak)+8, height-20, playerpingtable[i], V_TRANSLUCENT);
|
||||
if ((netgame && i != serverplayer) || (cv_mindelay.value && P_IsLocalPlayer(&players[i])))
|
||||
{
|
||||
ping = playerpingtable[i];
|
||||
|
||||
if (P_IsLocalPlayer(&players[i]) && ping <= (tic_t)cv_mindelay.value)
|
||||
{
|
||||
ping = cv_mindelay.value;
|
||||
}
|
||||
|
||||
HU_drawPing((templength - duptweak)+8, height-20, ping, V_TRANSLUCENT);
|
||||
}
|
||||
}
|
||||
|
||||
if ((length += len) >= dupadjust+8)
|
||||
|
||||
+12
-3
@@ -9176,6 +9176,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
||||
INT32 i, rightoffset = 240;
|
||||
const UINT8 *colormap;
|
||||
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
|
||||
UINT32 ping = 0;
|
||||
|
||||
boolean (*_isHighlightedPlayer)(const player_t *) = (demo.playback ? P_IsDisplayPlayer : P_IsLocalPlayer);
|
||||
|
||||
@@ -9201,9 +9202,17 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
||||
const boolean whiteplayer = _isHighlightedPlayer(&players[pnum]);
|
||||
const INT32 philicol = (whiteplayer ? V_SkinColorToHighlightcolor(players[pnum].skincolor) : 0);
|
||||
|
||||
if (netgame // don't draw it offline
|
||||
&& pnum != serverplayer)
|
||||
HU_drawPing(x + ((i < 8) ? -17 : rightoffset + 11), y-4, playerpingtable[pnum], 0);
|
||||
if ((netgame && pnum != serverplayer) || (cv_mindelay.value && P_IsLocalPlayer(&players[pnum])))
|
||||
{
|
||||
ping = playerpingtable[pnum];
|
||||
|
||||
if (P_IsLocalPlayer(&players[pnum]) && ping <= (tic_t)cv_mindelay.value)
|
||||
{
|
||||
ping = cv_mindelay.value;
|
||||
}
|
||||
|
||||
HU_drawPing(x + ((i < 8) ? -17 : rightoffset + 11), y-4, ping, 0);
|
||||
}
|
||||
|
||||
STRBUFCPY(strtime, tab[i].name);
|
||||
|
||||
|
||||
+6
-1
@@ -521,7 +521,12 @@ void SCR_DisplayLocalPing(void)
|
||||
if (cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
|
||||
{
|
||||
INT32 dispy = (cv_ticrate.value == 1) ? 165 : ((cv_ticrate.value == 2 || cv_ticrate.value == 4) ? 172 : ((cv_ticrate.value == 3) ? 163 : 181)); // absolute buttpain
|
||||
|
||||
|
||||
if (ping <= (tic_t)cv_mindelay.value)
|
||||
{
|
||||
ping = cv_mindelay.value;
|
||||
}
|
||||
|
||||
HU_drawPing(308, dispy, ping, pingflags);
|
||||
}
|
||||
}
|
||||
+9
-4
@@ -1475,11 +1475,16 @@ void I_FinishUpdate(void)
|
||||
if (I_SkipFrame())
|
||||
return;
|
||||
|
||||
if (cv_ticrate.value && st_overlay)
|
||||
SCR_DisplayTicRate();
|
||||
if (st_overlay)
|
||||
{
|
||||
if (cv_ticrate.value)
|
||||
SCR_DisplayTicRate();
|
||||
|
||||
if (cv_showping.value && netgame && consoleplayer != serverplayer && st_overlay)
|
||||
SCR_DisplayLocalPing();
|
||||
if (cv_showping.value && netgame && consoleplayer != serverplayer)
|
||||
SCR_DisplayLocalPing();
|
||||
if (cv_showping.value && cv_mindelay.value && consoleplayer == serverplayer && Playing())
|
||||
SCR_DisplayLocalPing();
|
||||
}
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
if (discordRequestList != NULL)
|
||||
|
||||
Reference in new issue
Block a user