move this

no need to have two conditions for same thing
This commit is contained in:
Alug committed 2025-01-25 21:50:40 +01:00
1 parent f14591033d
commit 10c0c8afab
1 file changed
+12 -16
+12 -16
View File
@@ -2415,7 +2415,6 @@ void HU_drawPlayerPing(INT32 x, INT32 y, INT32 pnum, INT32 flags)
UINT8 barcolor = 31; // color we use for the bars (green, yellow, red or black)
SINT8 i = 0;
SINT8 yoffset = 6;
//INT32 dx;
UINT32 lag = playerpingtable[pnum];
const boolean gentleman = ((cv_mindelay.value && (lag < (tic_t)cv_mindelay.value) && P_IsLocalPlayer(&players[pnum])) || (pnum == serverplayer && lowest_lag != 0)); // for serverplayer lowest_lag actually reflects mindelay
@@ -2442,6 +2441,18 @@ void HU_drawPlayerPing(INT32 x, INT32 y, INT32 pnum, INT32 flags)
}
else if (cv_pingstyle.value == 1) // old style ping
{
if (vid.width >= 640) // how sad, we're using a shit resolution.
{
if (measureid == 1)
{
V_DrawRightAlignedSmallString(x+12, y+13, V_ALLOWLOWERCASE|flags, va("%dms", Ping_conversion(lag)));
}
else if (measureid == 0)
{
V_DrawRightAlignedSmallString(x+12, y+13, flags, va("d%d", Ping_conversion(lag)));
}
}
if (cv_pingicon.value)
{
if (lag < 4)
@@ -2464,22 +2475,7 @@ void HU_drawPlayerPing(INT32 x, INT32 y, INT32 pnum, INT32 flags)
numbars = 0;
barcolor = 31;
}
}
if (vid.width >= 640) // how sad, we're using a shit resolution.
{
if (measureid == 1)
{
V_DrawRightAlignedSmallString(x+12, y+13, V_ALLOWLOWERCASE|flags, va("%dms", Ping_conversion(lag)));
}
else if (measureid == 0)
{
V_DrawRightAlignedSmallString(x+12, y+13, flags, va("d%d", Ping_conversion(lag)));
}
}
if (cv_pingicon.value)
{
for (i = 0; (i < 3); i++) // Draw the ping bar
{
V_DrawFill(x+2 *(i-1)+7, y+8+yoffset-4, 2, 8-yoffset, 31|flags);