From c696ca3e84e26b01f3002e9179cea8d46e367f71 Mon Sep 17 00:00:00 2001 From: Johan le stickman Date: Sun, 10 Sep 2023 02:27:17 +0200 Subject: [PATCH] Offset moins important --- modules/el2zay.elbot/random-map-point.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/el2zay.elbot/random-map-point.js b/modules/el2zay.elbot/random-map-point.js index 80d4a94..e45db02 100644 --- a/modules/el2zay.elbot/random-map-point.js +++ b/modules/el2zay.elbot/random-map-point.js @@ -29,8 +29,8 @@ function generateRandomCoordinates() { const randomCity = cities[Math.floor(Math.random() * cities.length)] // Ajoutez un décalage aléatoire pour obtenir une position GPS dans la ville, mais pas exactement au centre - const latitudeOffset = Math.random() * (0.8 - 0.1) - const longitudeOffset = Math.random() * (0.8 - 0.1) + const latitudeOffset = Math.random() * (0.2 - 0.1) + const longitudeOffset = Math.random() * (0.2 - 0.1) // Calculez les coordonnées GPS finales, et les retourner const latitude = randomCity.latitude + latitudeOffset