This commit is contained in:
lilyissillyyy
2026-02-17 16:13:27 -05:00
parent 1430853002
commit 33d95777c3
+7 -7
View File
@@ -382,15 +382,15 @@ module.exports = class CarRaceCommand extends Command {
if (turnWin && oppoData.spaces > 0) { if (turnWin && oppoData.spaces > 0) {
motionBlur(ctx, oppoData.car, oppoCarX, 208, oppoData.car.width, oppoData.car.height); motionBlur(ctx, oppoData.car, oppoCarX, 208, oppoData.car.width, oppoData.car.height);
if (oppoData.trail && oppoCarX > oppoData.car.width) { if (oppoData.trail && oppoCarX > oppoData.car.width) {
for (let x = oppoCarX; x >= 0; x -= oppoData.trail.width) { for (let x = oppoCarX - oppoData.trail.width; x >= 0; x -= oppoData.trail.width) {
motionBlur(ctx, oppoData.trail, oppoCarX - i, 208, oppoData.trail.width, oppoData.trail.height); motionBlur(ctx, oppoData.trail, x, 208, oppoData.trail.width, oppoData.trail.height);
} }
} }
} else { } else {
ctx.drawImage(oppoData.car, oppoCarX, 208); ctx.drawImage(oppoData.car, oppoCarX, 208);
if (oppoData.trail && oppoCarX > oppoData.car.width) { if (oppoData.trail && oppoCarX > oppoData.car.width) {
for (let x = oppoCarX; x >= 0; x -= oppoData.trail.width) { for (let x = oppoCarX - oppoData.trail.width; x >= 0; x -= oppoData.trail.width) {
ctx.drawImage(oppoData.trail, oppoCarX - i, 208); ctx.drawImage(oppoData.trail, x, 208);
} }
} }
} }
@@ -398,14 +398,14 @@ module.exports = class CarRaceCommand extends Command {
if (turnWin && userData.spaces > 0) { if (turnWin && userData.spaces > 0) {
motionBlur(ctx, userData.car, userCarX, 254, userData.car.width, userData.car.height); motionBlur(ctx, userData.car, userCarX, 254, userData.car.width, userData.car.height);
if (userData.trail && userCarX > userData.car.width) { if (userData.trail && userCarX > userData.car.width) {
for (let x = userCarX; x >= 0; x -= userData.trail.width) { for (let x = userCarX - userData.trail.width; x >= 0; x -= userData.trail.width) {
motionBlur(ctx, userData.trail, userCarX - i, 254, userData.trail.width, userData.trail.height); motionBlur(ctx, userData.trail, x, 254, userData.trail.width, userData.trail.height);
} }
} }
} else { } else {
ctx.drawImage(userData.car, userCarX, 254); ctx.drawImage(userData.car, userCarX, 254);
if (userData.trail && userCarX > userData.car.width) { if (userData.trail && userCarX > userData.car.width) {
for (let x = userCarX; x >= 0; x -= userData.trail.width) { for (let x = userCarX - userData.trail.width; x >= 0; x -= userData.trail.width) {
ctx.drawImage(userData.trail, x, 208); ctx.drawImage(userData.trail, x, 208);
} }
} }