backup: before bulk replacement
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user