mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user