From e0c33596e8e51d902cde1bc79d6a589cf6243316 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 27 Apr 2024 04:09:18 -0700 Subject: [PATCH 1/6] Sync mindelay setting to server - Adds playerdelaytable, no UX changes --- src/cvars.cpp | 3 ++- src/d_clisrv.c | 4 ++++ src/d_clisrv.h | 2 ++ src/d_netcmd.c | 13 ++++++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index fcb0e08cd..b5e45757d 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -399,7 +399,6 @@ consvar_t cv_menuframeskip = Player("menuframeskip", "Off").values({ {144, "MAX"}, {0, "Off"}, }); -consvar_t cv_mindelay = Player("mindelay", "2").min_max(0, 30); consvar_t cv_movebob = Player("movebob", "1.0").floating_point().min_max(0, 4*FRACUNIT); consvar_t cv_netstat = Player("netstat", "Off").on_off().dont_save(); // show bandwidth statistics consvar_t cv_netticbuffer = Player("netticbuffer", "1").min_max(0, 3); @@ -1193,6 +1192,8 @@ consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS] = { Player("kickstartaccel4", "Off").on_off().onchange(weaponPrefChange4) }; +consvar_t cv_mindelay = Player("mindelay", "2").min_max(0, 30).onchange(weaponPrefChange); + extern CV_PossibleValue_t Color_cons_t[]; void Color1_OnChange(void); void Color2_OnChange(void); diff --git a/src/d_clisrv.c b/src/d_clisrv.c index a4a778bec..959f86248 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -122,6 +122,7 @@ UINT16 pingmeasurecount = 1; UINT32 realpingtable[MAXPLAYERS]; //the base table of ping where an average will be sent to everyone. UINT32 playerpingtable[MAXPLAYERS]; //table of player latency values. UINT32 playerpacketlosstable[MAXPLAYERS]; +UINT32 playerdelaytable[MAXPLAYERS]; // mindelay values. #define GENTLEMANSMOOTHING (TICRATE) static tic_t reference_lag; @@ -3344,6 +3345,7 @@ void SV_ResetServer(void) memset(realpingtable, 0, sizeof realpingtable); memset(playerpingtable, 0, sizeof playerpingtable); memset(playerpacketlosstable, 0, sizeof playerpacketlosstable); + memset(playerdelaytable, 0, sizeof playerdelaytable); ClearAdminPlayers(); Schedule_Clear(); @@ -5278,6 +5280,7 @@ static void HandlePacketFromPlayer(SINT8 node) { playerpingtable[i] = (tic_t)netbuffer->u.netinfo.pingtable[i]; playerpacketlosstable[i] = netbuffer->u.netinfo.packetloss[i]; + playerdelaytable[i] = netbuffer->u.netinfo.delay[i]; } } @@ -6251,6 +6254,7 @@ static inline void PingUpdate(void) } netbuffer->u.netinfo.packetloss[i] = lost; + netbuffer->u.netinfo.delay[i] = playerdelaytable[i]; } // send the server's maxping as last element of our ping table. This is useful to let us know when we're about to get kicked. diff --git a/src/d_clisrv.h b/src/d_clisrv.h index c9277fac6..dc80c059e 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -405,6 +405,7 @@ struct netinfo_pak { UINT32 pingtable[MAXPLAYERS+1]; UINT32 packetloss[MAXPLAYERS+1]; + UINT32 delay[MAXPLAYERS+1]; } ATTRPACK; // @@ -546,6 +547,7 @@ extern UINT16 pingmeasurecount; extern UINT32 realpingtable[MAXPLAYERS]; extern UINT32 playerpingtable[MAXPLAYERS]; extern UINT32 playerpacketlosstable[MAXPLAYERS]; +extern UINT32 playerdelaytable[MAXPLAYERS]; extern tic_t servermaxping; extern boolean server_lagless; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 7a9d1b403..6dfb53797 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1276,7 +1276,11 @@ void WeaponPref_Send(UINT8 ssplayer) if (gamecontrolflags[ssplayer] & GCF_ANALOGSTICK) prefs |= WP_ANALOGSTICK; - SendNetXCmdForPlayer(ssplayer, XD_WEAPONPREF, &prefs, 1); + UINT8 buf[2]; + buf[0] = prefs; + buf[1] = cv_mindelay.value; + + SendNetXCmdForPlayer(ssplayer, XD_WEAPONPREF, buf, sizeof buf); } void WeaponPref_Save(UINT8 **cp, INT32 playernum) @@ -1338,6 +1342,13 @@ static void Got_WeaponPref(const UINT8 **cp,INT32 playernum) { *cp += WeaponPref_Parse(*cp, playernum); + UINT8 mindelay = READUINT8(*cp); + if (server) + { + for (UINT8 i = 0; i < G_LocalSplitscreenPartySize(playernum); ++i) + playerdelaytable[G_LocalSplitscreenPartyMember(playernum, i)] = mindelay; + } + // SEE ALSO g_demo.c demo_extradata[playernum] |= DXD_WEAPONPREF; } From 1bf2b9a7db0eac67951adcf213e253784a20d2da Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 27 Apr 2024 04:11:48 -0700 Subject: [PATCH 2/6] HUD: fix packet loss indicator offset for Brazil --- src/hu_stuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index b9b40385f..46a70ac76 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2251,8 +2251,8 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole if (pl) { V_DrawFill( - x/FRACUNIT + 2 - 1, - y/FRACUNIT - 1, + -pinggfx[gfxnum]->leftoffset + x/FRACUNIT + 2 - 1, + -pinggfx[gfxnum]->topoffset + y/FRACUNIT - 1, pinggfx[gfxnum]->width + 2, pinggfx[gfxnum]->height + 2, PL_gfx_color(pl) | flags From 64a4bcad34a0fba033050d6a9007e7e38472de49 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 27 Apr 2024 04:18:31 -0700 Subject: [PATCH 3/6] HUD: fix alignment of delay indicator digits - Tab - Fix alignment on right side of tab rankings - Fix alignment in milliseconds mode - Fix packet loss indicator overlapping ms graphic --- src/hu_stuff.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 46a70ac76..46a68b7c0 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2218,11 +2218,7 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole if (toside == 0) { - if (measureid == 1) - { - x2 += ((11 - pingmeasure[measureid]->width) * FRACUNIT); - } - else + if (measureid == 0) { x2 += (10 * FRACUNIT); } @@ -2231,23 +2227,25 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole } else if (toside > 0) { - x2 += (20 * FRACUNIT); + // V_DrawPingNum + const fixed_t w = (fontv[PINGNUM_FONT].font[0]->width) * FRACUNIT - FRACUNIT; + x2 += (16 * FRACUNIT) + (int)(log(Ping_conversion(lag)) / log(10)) * w; + + if (measureid == 0) + { + x2 += (4 * FRACUNIT); + } + } + else if (toside < 0) + { + if (measureid == 1) + { + x2 -= (pingmeasure[measureid]->width * FRACUNIT); + } } - //else if (toside < 0) gfxnum = Ping_gfx_num(lag); - if (measureid == 1) - { - V_DrawFixedPatch( - x2, - y2, - FRACUNIT, flags, - pingmeasure[measureid], - NULL - ); - } - if (pl) { V_DrawFill( @@ -2280,6 +2278,17 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole ); } + if (measureid == 1) + { + V_DrawFixedPatch( + x2, + y2, + FRACUNIT, flags, + pingmeasure[measureid], + NULL + ); + } + colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(lag), GTC_CACHE); if (servermaxping && lag > servermaxping && hu_tick < 4) From 8103bd21c17318e69daea9e744959ef0ea5c3716 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 27 Apr 2024 04:23:04 -0700 Subject: [PATCH 4/6] HUD: fix delay indicator online - As a bonus, the mindelay setting of other players is now visible to everyone --- src/d_clisrv.c | 43 ++++++++++++------------------ src/hu_stuff.c | 69 +++++++++++++++++++++++++------------------------ src/hu_stuff.h | 4 +-- src/k_hud.cpp | 4 ++- src/screen.c | 4 +-- src/y_inter.cpp | 4 +-- 6 files changed, 61 insertions(+), 67 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 959f86248..99b3a304a 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -6305,39 +6305,30 @@ static void UpdatePingTable(void) } } - // Don't gentleman below your mindelay - if (fastest < (tic_t)cv_mindelay.value) - fastest = (tic_t)cv_mindelay.value; - - pingmeasurecount++; - if (server_lagless) lowest_lag = 0; else - { lowest_lag = fastest; - if (fastest) - lag = fastest; - else - lag = GetLag(0); + // Don't gentleman below your mindelay + if (lowest_lag < (tic_t)cv_mindelay.value) + lowest_lag = (tic_t)cv_mindelay.value; - lag = ( realpingtable[0] + lag ); + pingmeasurecount++; - switch (playerpernode[0]) - { - case 4: - realpingtable[nodetoplayer4[0]] = lag; - /*FALLTHRU*/ - case 3: - realpingtable[nodetoplayer3[0]] = lag; - /*FALLTHRU*/ - case 2: - realpingtable[nodetoplayer2[0]] = lag; - /*FALLTHRU*/ - case 1: - realpingtable[nodetoplayer[0]] = lag; - } + switch (playerpernode[0]) + { + case 4: + playerdelaytable[nodetoplayer4[0]] = lowest_lag; + /*FALLTHRU*/ + case 3: + playerdelaytable[nodetoplayer3[0]] = lowest_lag; + /*FALLTHRU*/ + case 2: + playerdelaytable[nodetoplayer2[0]] = lowest_lag; + /*FALLTHRU*/ + case 1: + playerdelaytable[nodetoplayer[0]] = lowest_lag; } } else // We're a client, handle mindelay on the way out. diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 46a68b7c0..0cbfa0d1f 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2183,6 +2183,31 @@ Ping_gfx_color (int lag) return SKINCOLOR_MAGENTA; } +static const UINT8 * +Ping_gfx_colormap (UINT32 ping, UINT32 lag) +{ + const UINT8 *colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(lag), GTC_CACHE); + + if (servermaxping && ping > servermaxping && hu_tick < 4) + { + // flash ping red if too high + colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_WHITE, GTC_CACHE); + } + + return colormap; +} + +static UINT32 +Ping_conversion (UINT32 lag) +{ + if (cv_pingmeasurement.value) + { + lag = (INT32)(lag * (1000.00f / TICRATE)); + } + + return lag; +} + static int PL_gfx_color (int pl) { @@ -2199,20 +2224,13 @@ PL_gfx_color (int pl) // // HU_drawPing // -void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boolean offline, SINT8 toside) +void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 lag, UINT32 pl, INT32 flags, SINT8 toside) { - UINT8 *colormap = NULL; + const UINT8 *colormap = NULL; INT32 measureid = cv_pingmeasurement.value ? 1 : 0; INT32 gfxnum; // gfx to draw - boolean drawlocal = (offline && cv_mindelay.value && lag <= (tic_t)cv_mindelay.value); fixed_t x2, y2; - if (!server && lag <= (tic_t)cv_mindelay.value) - { - lag = cv_mindelay.value; - drawlocal = true; - } - x2 = x; y2 = y + FRACUNIT; @@ -2244,7 +2262,7 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole } } - gfxnum = Ping_gfx_num(lag); + gfxnum = Ping_gfx_num(ping); if (pl) { @@ -2257,7 +2275,7 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole ); } - if (drawlocal) + if (ping <= lag) { V_DrawFixedPatch( x + (2 * FRACUNIT), @@ -2289,23 +2307,12 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole ); } - colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(lag), GTC_CACHE); - - if (servermaxping && lag > servermaxping && hu_tick < 4) - { - // flash ping red if too high - colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_WHITE, GTC_CACHE); - } - - if (cv_pingmeasurement.value) - { - lag = (INT32)(lag * (1000.00f / TICRATE)); - } + colormap = Ping_gfx_colormap(ping, lag); x2 = V_DrawPingNum( x2, y2, - flags, lag, + flags, Ping_conversion(lag), colormap ); @@ -2322,7 +2329,7 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 lag, UINT32 pl, INT32 flags, boole } void -HU_drawMiniPing (INT32 x, INT32 y, UINT32 lag, INT32 flags) +HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags) { patch_t *patch; INT32 w = BASEVIDWIDTH; @@ -2332,16 +2339,10 @@ HU_drawMiniPing (INT32 x, INT32 y, UINT32 lag, INT32 flags) w /= 2; } - // This looks kinda dumb, but basically: - // Servers with mindelay set modify the ping table. - // Clients with mindelay unset don't, because they can't. - // Both are affected by mindelay, but a client's lag value is pre-adjustment. - if (server && cv_mindelay.value && (tic_t)cv_mindelay.value <= lag) - patch = pinglocal[1]; - else if (!server && cv_mindelay.value && (tic_t)cv_mindelay.value >= lag) - patch = pinglocal[1]; + if (ping <= lag) + patch = pinglocal[1]; // stone shoe else - patch = mping[Ping_gfx_num(lag)]; + patch = mping[Ping_gfx_num(ping)]; if (( flags & V_SNAPTORIGHT )) x += ( w - SHORT (patch->width) ); diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 0a359f4f7..5747cd85e 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -156,8 +156,8 @@ void HU_TickSongCredits(void); char HU_dequeueChatChar(void); void HU_Erase(void); void HU_clearChatChars(void); -void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 packetloss, INT32 flags, boolean offline, SINT8 toside); // Lat': Ping drawer for scoreboard. -void HU_drawMiniPing(INT32 x, INT32 y, UINT32 ping, INT32 flags); +void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 lag, UINT32 packetloss, INT32 flags, SINT8 toside); // Lat': Ping drawer for scoreboard. +void HU_drawMiniPing(INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags); // CECHO interface. void HU_ClearCEcho(void); diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 75f4ecf27..f13484a0d 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -5535,7 +5535,9 @@ void K_drawKartFreePlay(void) static void Draw_party_ping (int ss, INT32 snap) { - HU_drawMiniPing(0, 0, playerpingtable[displayplayers[ss]], V_SPLITSCREEN|V_SNAPTOTOP|snap); + UINT32 ping = playerpingtable[displayplayers[ss]]; + UINT32 mindelay = playerdelaytable[displayplayers[ss]]; + HU_drawMiniPing(0, 0, ping, std::max(ping, mindelay), V_SPLITSCREEN|V_SNAPTOTOP|snap); } static void diff --git a/src/screen.c b/src/screen.c index 6a864a94d..ecddd741e 100644 --- a/src/screen.c +++ b/src/screen.c @@ -577,13 +577,13 @@ void SCR_DisplayLocalPing(void) return; } + UINT32 mindelay = playerdelaytable[consoleplayer]; UINT32 ping = playerpingtable[consoleplayer]; UINT32 pl = playerpacketlosstable[consoleplayer]; INT32 dispy = cv_ticrate.value ? 170 : 181; - boolean offline = (consoleplayer == serverplayer); - HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, pl, V_SNAPTORIGHT | V_SNAPTOBOTTOM, offline, 0); + HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, max(ping, mindelay), pl, V_SNAPTORIGHT | V_SNAPTOBOTTOM, 0); } diff --git a/src/y_inter.cpp b/src/y_inter.cpp index 9f2372180..897f009b4 100644 --- a/src/y_inter.cpp +++ b/src/y_inter.cpp @@ -716,14 +716,14 @@ void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 xoffset) kp_cpu );*/ } - else if (pnum != serverplayer || !server_lagless) + else { HU_drawPing( (x2 - 2) * FRACUNIT, (y-2) * FRACUNIT, playerpingtable[pnum], + playerdelaytable[pnum], playerpacketlosstable[pnum], 0, - false, (datarightofcolumn ? 1 : -1) ); } From 3e5f6466a0ad6297a6951f1481a8d12d2948445f Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 27 Apr 2024 04:30:21 -0700 Subject: [PATCH 5/6] Base gentlemen delay on lowest average Was previously based on the delay at the moment of calculation, which may fluctuate. I changed it to use the average because the number was flickering in the HUD. --- src/d_clisrv.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 99b3a304a..6744f7ed1 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -6289,19 +6289,15 @@ static void UpdatePingTable(void) { if (playeringame[i] && playernode[i] > 0) { - if (! server_lagless && playernode[i] > 0 && !players[i].spectator) - { - lag = GetLag(playernode[i]); - realpingtable[i] += lag; + // TicsToMilliseconds can't handle pings over 1000ms lol + realpingtable[i] += GetLag(playernode[i]); + if (!players[i].spectator) + { + lag = playerpingtable[i]; if (! fastest || lag < fastest) fastest = lag; } - else - { - // TicsToMilliseconds can't handle pings over 1000ms lol - realpingtable[i] += GetLag(playernode[i]); - } } } From bf381730bd96e0697c9d9c860eb0e30f740ebd6c Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 30 Apr 2024 16:09:37 -0700 Subject: [PATCH 6/6] Fix displayed delay number for HU_drawPing and HU_drawMiniPing --- src/hu_stuff.c | 53 +++++++++++++++++++++++--------------------------- src/k_hud.cpp | 2 +- src/screen.c | 2 +- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 0cbfa0d1f..4af5b2235 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2224,12 +2224,13 @@ PL_gfx_color (int pl) // // HU_drawPing // -void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 lag, UINT32 pl, INT32 flags, SINT8 toside) +void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 mindelay, UINT32 pl, INT32 flags, SINT8 toside) { const UINT8 *colormap = NULL; INT32 measureid = cv_pingmeasurement.value ? 1 : 0; - INT32 gfxnum; // gfx to draw + patch_t *gfx; // gfx to draw fixed_t x2, y2; + UINT32 lag = max(ping, mindelay); x2 = x; y2 = y + FRACUNIT; @@ -2262,39 +2263,33 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 lag, UINT32 pl, INT32 } } - gfxnum = Ping_gfx_num(ping); + if (ping <= mindelay) + { + gfx = pinglocal[0]; + } + else + { + gfx = pinggfx[Ping_gfx_num(ping)]; + } if (pl) { V_DrawFill( - -pinggfx[gfxnum]->leftoffset + x/FRACUNIT + 2 - 1, - -pinggfx[gfxnum]->topoffset + y/FRACUNIT - 1, - pinggfx[gfxnum]->width + 2, - pinggfx[gfxnum]->height + 2, + -gfx->leftoffset + x/FRACUNIT + 2 - 1, + -gfx->topoffset + y/FRACUNIT - 1, + gfx->width + 2, + gfx->height + 2, PL_gfx_color(pl) | flags ); } - if (ping <= lag) - { - V_DrawFixedPatch( - x + (2 * FRACUNIT), - y, - FRACUNIT, flags, - pinglocal[0], - NULL - ); - } - else - { - V_DrawFixedPatch( - x + (2 * FRACUNIT), - y, - FRACUNIT, flags, - pinggfx[gfxnum], - NULL - ); - } + V_DrawFixedPatch( + x + (2 * FRACUNIT), + y, + FRACUNIT, flags, + gfx, + NULL + ); if (measureid == 1) { @@ -2329,7 +2324,7 @@ void HU_drawPing(fixed_t x, fixed_t y, UINT32 ping, UINT32 lag, UINT32 pl, INT32 } void -HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags) +HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 mindelay, INT32 flags) { patch_t *patch; INT32 w = BASEVIDWIDTH; @@ -2339,7 +2334,7 @@ HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, UINT32 lag, INT32 flags) w /= 2; } - if (ping <= lag) + if (ping <= mindelay) patch = pinglocal[1]; // stone shoe else patch = mping[Ping_gfx_num(ping)]; diff --git a/src/k_hud.cpp b/src/k_hud.cpp index f13484a0d..bdb8ce21f 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -5537,7 +5537,7 @@ Draw_party_ping (int ss, INT32 snap) { UINT32 ping = playerpingtable[displayplayers[ss]]; UINT32 mindelay = playerdelaytable[displayplayers[ss]]; - HU_drawMiniPing(0, 0, ping, std::max(ping, mindelay), V_SPLITSCREEN|V_SNAPTOTOP|snap); + HU_drawMiniPing(0, 0, ping, mindelay, V_SPLITSCREEN|V_SNAPTOTOP|snap); } static void diff --git a/src/screen.c b/src/screen.c index ecddd741e..2f0184cad 100644 --- a/src/screen.c +++ b/src/screen.c @@ -583,7 +583,7 @@ void SCR_DisplayLocalPing(void) INT32 dispy = cv_ticrate.value ? 170 : 181; - HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, max(ping, mindelay), pl, V_SNAPTORIGHT | V_SNAPTOBOTTOM, 0); + HU_drawPing(307 * FRACUNIT, dispy * FRACUNIT, ping, mindelay, pl, V_SNAPTORIGHT | V_SNAPTOBOTTOM, 0); }