From b19f715160ea5c96b076d787f0f1080f4e423e43 Mon Sep 17 00:00:00 2001 From: Shiroi Kitsu <108461408+shiroikitsu8@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:01:45 +0700 Subject: [PATCH] fix wrong value --- src/modules/cars/functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/cars/functions.ts b/src/modules/cars/functions.ts index f1a6bb3..5a0a440 100644 --- a/src/modules/cars/functions.ts +++ b/src/modules/cars/functions.ts @@ -147,7 +147,7 @@ export async function getOpponentsTarget(carId: number, registeredargetAvailable } // Randomize it 5 times - while(randomArray.length < 5) + while(randomArray.length < maxNumber) { // Pick random car Id random = Math.floor(Math.random() * opponentTargetCount + 0.9);