mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-lap-cheat-edge-case' into 'master'
Lap cheat prevention: always reset lap to safelap when timer is reset See merge request KartKrew/Kart!2069
This commit is contained in:
commit
aa9f1246e8
1 changed files with 6 additions and 1 deletions
|
|
@ -10050,9 +10050,14 @@ static void K_UpdatePlayerWaypoints(player_t *const player)
|
|||
else
|
||||
{
|
||||
// Reset the auto respawn timer if distance changes are back to normal.
|
||||
if (player->bigwaypointgap <= AUTORESPAWN_THRESHOLD + 1)
|
||||
if (player->bigwaypointgap && player->bigwaypointgap <= AUTORESPAWN_THRESHOLD + 1)
|
||||
{
|
||||
player->bigwaypointgap = 0;
|
||||
|
||||
// While the player was in the "bigwaypointgap" state, laps did not change from crossing finish lines.
|
||||
// So reset the lap back to normal, in case they were able to get behind the line.
|
||||
player->laps = player->lastsafelap;
|
||||
player->cheatchecknum = player->lastsafecheatcheck;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue