From 26a280d4dc716d469a673340ef6b51ce4e6443ba Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Feb 2021 09:24:04 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index a52beea4..3033dc8d 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -204,12 +204,16 @@ module.exports = class ChessCommand extends Command { const img = this.images[parsed.color][parsed.name]; const { x, y, width, height } = centerImagePart(img, 61, 61, w, h); if (prevPieces && (!prevGamePiece || piece !== prevGamePiece)) { - drawImageWithTint(ctx, img, 'green', x, y, width, height); + ctx.fillStyle = 'yellow'; + ctx.globalAlpha = 0.5; + ctx.fillRect(w, h, 61, 61); + ctx.globalAlpha = 1; + ctx.drawImage(img, x, y, width, height); } else { ctx.drawImage(img, x, y, width, height); } } else if (prevGamePiece) { - ctx.fillStyle = 'green'; + ctx.fillStyle = 'yellow'; ctx.globalAlpha = 0.5; ctx.fillRect(w, h, 61, 61); ctx.globalAlpha = 1;