From 1614f65832cb23c6f276e7ab9df007c66813c67f Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Tue, 17 Feb 2026 16:34:01 -0500 Subject: [PATCH] Fix --- commands/games-mp/car-race.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/games-mp/car-race.js b/commands/games-mp/car-race.js index 6fce462c..09e56b8e 100644 --- a/commands/games-mp/car-race.js +++ b/commands/games-mp/car-race.js @@ -381,15 +381,15 @@ module.exports = class CarRaceCommand extends Command { const oppoCarX = oppoData.spaces < 7 ? -155 + (77 * oppoData.spaces) : bg.width - 155; if (turnWin && oppoData.spaces > 0) { motionBlur(ctx, oppoData.car, oppoCarX, 208, oppoData.car.width, oppoData.car.height); - if (oppoData.trail && oppoCarX > oppoData.car.width) { - for (let x = oppoCarX - oppoData.trail.width; x + oppoData.trail.width > 0; x -= oppoData.trail.width) { + if (oppoData.trail && 0) { + for (let x = oppoCarX - oppoData.trail.width; x > -oppoData.trail.width; x -= oppoData.trail.width) { motionBlur(ctx, oppoData.trail, x, 208, oppoData.trail.width, oppoData.trail.height); } } } else { ctx.drawImage(oppoData.car, oppoCarX, 208); - if (oppoData.trail && oppoCarX > oppoData.car.width) { - for (let x = oppoCarX - oppoData.trail.width; x + oppoData.trail.width > 0; x -= oppoData.trail.width) { + if (oppoData.trail && oppoCarX > 0) { + for (let x = oppoCarX - oppoData.trail.width; x > -oppoData.trail.width; x -= oppoData.trail.width) { ctx.drawImage(oppoData.trail, x, 208); } } @@ -397,15 +397,15 @@ module.exports = class CarRaceCommand extends Command { const userCarX = userData.spaces < 7 ? -155 + (77 * userData.spaces) : bg.width - 155; if (turnWin && userData.spaces > 0) { motionBlur(ctx, userData.car, userCarX, 254, userData.car.width, userData.car.height); - if (userData.trail && userCarX > userData.car.width) { - for (let x = userCarX - userData.trail.width; x + userData.trail.width > 0; x -= userData.trail.width) { + if (userData.trail && userCarX > 0) { + for (let x = userCarX - userData.trail.width; x > -userData.trail.width; x -= userData.trail.width) { motionBlur(ctx, userData.trail, x, 254, userData.trail.width, userData.trail.height); } } } else { ctx.drawImage(userData.car, userCarX, 254); - if (userData.trail && userCarX > userData.car.width) { - for (let x = userCarX - userData.trail.width; x + userData.trail.width > 0; x -= userData.trail.width) { + if (userData.trail && userCarX > 0) { + for (let x = userCarX - userData.trail.width; x > -userData.trail.width; x -= userData.trail.width) { ctx.drawImage(userData.trail, x, 208); } }