Update waypoints on same tic as crossing finish line

Fix 1 tic delay between crossing finish line and next
waypoint updating. May influence respawn behavior.
This commit is contained in:
James R 2024-02-23 22:44:35 -08:00
parent 8063866479
commit 1919471ae4

View file

@ -1954,7 +1954,9 @@ static void K_HandleLapIncrement(player_t *player)
nump++; nump++;
} }
player->cheatchecknum = 0;
player->laps++; player->laps++;
K_UpdateAllPlayerPositions();
if (G_TimeAttackStart() && !linecrossed) if (G_TimeAttackStart() && !linecrossed)
{ {
@ -1987,8 +1989,6 @@ static void K_HandleLapIncrement(player_t *player)
if (netgame && player->laps > numlaps) if (netgame && player->laps > numlaps)
CON_LogMessage(va(M_GetText("%s has finished the race.\n"), player_names[player-players])); CON_LogMessage(va(M_GetText("%s has finished the race.\n"), player_names[player-players]));
player->cheatchecknum = 0;
if (gametyperules & GTR_SPECIALSTART) if (gametyperules & GTR_SPECIALSTART)
{ {
if (player->laps > numlaps) if (player->laps > numlaps)
@ -2182,6 +2182,7 @@ static void K_HandleLapDecrement(player_t *player)
{ {
player->cheatchecknum = numcheatchecks; player->cheatchecknum = numcheatchecks;
player->laps--; player->laps--;
K_UpdateAllPlayerPositions();
curlap = UINT32_MAX; curlap = UINT32_MAX;
} }
} }