1
0
mirror of synced 2024-12-05 03:27:57 +01:00

fix ghost list randomizing

This commit is contained in:
Shiroi Kitsu 2023-01-03 21:22:12 +07:00
parent f9e9aedeb3
commit 13f52c8dd3

View File

@ -358,7 +358,8 @@ export default class GhostModule extends Module {
while(arr.length < maxNumber)
{
// Pick random car Id
let randomNumber = MersenneTwister.int(0, maxNumber-1);
let randomNumber = MersenneTwister.int(0, car.length-1);
if(arr.indexOf(randomNumber) === -1)
{
// Push current number to array