level_tally_t::Init - Fix K_RaceLapCount map indexing issue

gamemap is one-indexed. This needs to change at some point, but this will do for now
This commit is contained in:
toaster 2023-09-11 00:16:48 +01:00
parent 03892812e5
commit 0aaf120fdf

View file

@ -330,14 +330,11 @@ void level_tally_t::Init(player_t *player)
if ((gametypes[gt]->rules & GTR_CIRCUIT) == GTR_CIRCUIT) if ((gametypes[gt]->rules & GTR_CIRCUIT) == GTR_CIRCUIT)
{ {
laps = player->lapPoints; laps = player->lapPoints;
totalLaps = K_RaceLapCount(gamemap-1);
if (inDuel == true) if (inDuel == false)
{ {
totalLaps = K_RaceLapCount(gamemap); totalLaps *= 2;
}
else
{
totalLaps = K_RaceLapCount(gamemap) * 2;
} }
} }