Duels end at 99 laps, high lapcount HUD safety

This commit is contained in:
Antonio Martinez 2025-09-24 22:09:43 -04:00
parent 8f213c7e1b
commit 39c2779fb2
3 changed files with 6 additions and 4 deletions

View file

@ -7166,11 +7166,13 @@ static void K_drawLapStartAnim(void)
oldval = (188 + (32 * std::max(0, progressOld - 76))) * FRACUNIT;
interpx = R_InterpolateFixed(oldval, newval);
UINT32 sanitizedlaps = std::min((UINT32)99, (UINT32)stplyr->latestlap);
V_DrawFixedPatch(
interpx, // 194
30*FRACUNIT, // 24
FRACUNIT, V_SNAPTOTOP|hudtransflags,
kp_lapanim_number[(((UINT32)stplyr->latestlap) / 10)][std::min(progress/2-8, 2)], NULL);
kp_lapanim_number[(sanitizedlaps / 10)][std::min(progress/2-8, 2)], NULL);
if (progress/2-10 >= 0)
{
@ -7182,7 +7184,7 @@ static void K_drawLapStartAnim(void)
interpx, // 221
30*FRACUNIT, // 24
FRACUNIT, V_SNAPTOTOP|hudtransflags,
kp_lapanim_number[(((UINT32)stplyr->latestlap) % 10)][std::min(progress/2-10, 2)], NULL);
kp_lapanim_number[(sanitizedlaps % 10)][std::min(progress/2-10, 2)], NULL);
}
}
}

View file

@ -98,7 +98,7 @@ Make sure this matches the actual number of states
#define FAILSAFETIME (4*TICRATE)
#define DUELOVERTIME (cv_dueltimelimit.value)
#define DUELWINNINGSCORE (cv_duelscorelimit.value)
#define DUELWINNINGSCORE (999)
#define MIN_WAVEDASH_CHARGE ((11*TICRATE/16)*9)

View file

@ -2020,7 +2020,7 @@ static void K_HandleLapIncrement(player_t *player)
}
// finished race exit setup
if (player->laps > numlaps && !K_InRaceDuel())
if (player->laps > numlaps)
{
pflags_t applyflags = 0;
if (specialstageinfo.valid == true)