Skip to content

Commit

Permalink
Fix random crash when increasing lap for red shells
Browse files Browse the repository at this point in the history
  • Loading branch information
tmalahie committed Aug 12, 2024
1 parent d9c0c30 commit 184f893
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/mk.js
Original file line number Diff line number Diff line change
Expand Up @@ -10313,6 +10313,7 @@ function incItemLap(fSprite) {
if (lapId === fSprite.ailap) return;
fSprite.ailap = lapId;
var lMap = getCurrentLMap(lapId);
if (fSprite.aimap === -1) return;
fSprite.aimap = fSprite.aimap % lMap.aipoints.length;
fSprite.aipoint = Math.min(fSprite.aipoint, lMap.aipoints[fSprite.aimap].length-1);
}
Expand Down

0 comments on commit 184f893

Please sign in to comment.