From 5dc79651554444e319de728b7aa2fca26f9580b7 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 28 Jun 2026 22:23:25 +0200 Subject: [PATCH] fix the lap emblem animation thingie --- src/k_hud.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/k_hud.c b/src/k_hud.c index 58edda387..5f6f04353 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -4404,6 +4404,9 @@ static void K_drawChallengerScreen(void) static void K_drawLapStartAnim(void) { + if (!cv_showlapemblem.value) + return; + // This is an EVEN MORE insanely complicated animation. const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation]; UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE); @@ -4447,9 +4450,10 @@ static void K_drawLapStartAnim(void) V_DrawFixedPatch(leftx, y, FRACUNIT, vflags, kp_lapanim_lap[min(progress/2, 6)], NULL); char *lapnum = va("%02d", stplyr->laps + 1); - const size_t laplength = strlen(lapnum); - for (size_t i = 0; i < laplength; i++) + const int laplength = (int)strlen(lapnum); + + for (int i = 0; i < laplength; i++) { int digit = lapnum[i] - '0'; int frame = min(2, progress/2 - 8 - (i*2)); @@ -4831,7 +4835,7 @@ void K_drawKartHUD(void) { if (stplyr->exiting) K_drawKartFinish(); - else if (stplyr->kartstuff[k_lapanimation] && !splitscreen && cv_showlapemblem.value) + else if (stplyr->kartstuff[k_lapanimation] && !splitscreen) K_drawLapStartAnim(); }