Skip to content

Commit ec6417d

Browse files
author
Niko
committed
bugfix
1 parent 96406c2 commit ec6417d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

decompile/General/PlayLevel/PlayLevel_0_UpdateLapStats.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,21 @@ void DECOMP_PlayLevel_UpdateLapStats(void)
3232
iVar9 = 0;
3333
iVar13 = 0;
3434
currRank = 0;
35+
36+
// driver pointer,
37+
// unlike other "rank" index variables
38+
firstRank = 0;
3539

3640
// find farthest-ahead human
3741
for (int iVar9 = 0; iVar9 < 8; iVar9++)
3842
{
39-
firstRank = gGT->driversInRaceOrder[iVar9];
43+
currDriver = gGT->driversInRaceOrder[iVar9];
4044

41-
if ((firstRank != 0) && ((firstRank->actionsFlagSet & 0x100000) == 0))
45+
if ((currDriver != 0) && ((currDriver->actionsFlagSet & 0x100000) == 0))
46+
{
47+
firstRank = currDriver;
4248
break;
49+
}
4350
}
4451

4552
#ifdef USE_ONLINE

0 commit comments

Comments
 (0)