backup: before bulk replacement

This commit is contained in:
2026-05-19 19:49:01 +01:00
parent d7bec1ae78
commit 27806f438f
11 changed files with 1044 additions and 955 deletions
+4 -4
View File
@@ -44,7 +44,7 @@ export async function getTrackMapConfig(
try {
// Try to fetch from openwheels.racing first
let configUrl = cleanConfig && cleanConfig !== 'default'
const configUrl = cleanConfig && cleanConfig !== 'default'
? `https://files.openwheels.racing/img/tracks/${cleanTrack}/${cleanConfig}/map.ini`
: `https://files.openwheels.racing/img/tracks/${cleanTrack}/map.ini`;
@@ -143,7 +143,7 @@ export function worldToMapCoords(
worldZ: number,
config: TrackMapConfig
): { x: number; y: number } {
var aspectRatio = config.width / config.height;
const aspectRatio = config.width / config.height;
// Add offsets to player position
console.log("config" , config);
@@ -154,8 +154,8 @@ export function worldToMapCoords(
worldZ = worldZ / aspectRatio;
}
var x = (worldX) + config.xOffset;
var y = (worldZ) + config.zOffset;
let x = (worldX) + config.xOffset;
let y = (worldZ) + config.zOffset;
y /= config.scaleFactor;
x /= config.scaleFactor;