From 2edc84003790a83d13ce422252b14bc7f9972444 Mon Sep 17 00:00:00 2001 From: James R Date: Fri, 19 Aug 2022 21:12:43 -0700 Subject: [PATCH] Draw PINGD before delay number --- src/hu_stuff.c | 8 ++++++-- src/v_video.c | 4 +++- src/v_video.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 405b28847..60b1d14da 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2552,7 +2552,8 @@ void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags) gfxnum = Ping_gfx_num(lag); - V_DrawScaledPatch(x+11 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]); + if (measureid == 1) + V_DrawScaledPatch(x+11 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]); V_DrawScaledPatch(x+2, y, flags, pinggfx[gfxnum]); if (servermaxping && lag > servermaxping && hu_tick < 4) @@ -2566,7 +2567,10 @@ void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags) lag = (INT32)(lag * (1000.00f / TICRATE)); } - V_DrawPingNum(x+11 - pingmeasure[measureid]->width, y+9, flags, lag, colormap); + x = V_DrawPingNum(x + (measureid == 1 ? 11 - pingmeasure[measureid]->width : 10), y+9, flags, lag, colormap); + + if (measureid == 0) + V_DrawScaledPatch(x+1 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]); } // diff --git a/src/v_video.c b/src/v_video.c index 7bbb2988b..09a473ed3 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -2028,7 +2028,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits) // Draws a number using the PING font thingy. // TODO: Merge number drawing functions into one with "font name" selection. -void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap) +INT32 V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap) { INT32 w = SHORT(pingnum[0]->width); // this SHOULD always be 5 but I guess custom graphics exist. @@ -2045,6 +2045,8 @@ void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colorm V_DrawFixedPatch(x<