Skip to content

Commit

Permalink
Fix fogofwar move sound regression
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Jan 7, 2025
1 parent e883dc0 commit 8087c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/roundCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ export class RoundController extends GameController {
//capture = (piece !== undefined && piece.role !== '_-piece' && step.san?.slice(0, 2) !== 'O-') || (step.san?.slice(1, 2) === 'x');
capture = this.ffishBoard.isCapture(msg.lastMove);
}
if (msg.steps.length <= 2 && lastMove && (this.turnColor === this.mycolor || this.spectator)) {
if (msg.steps.length <= 2 && this.steps.length > 1 && (this.turnColor === this.mycolor || this.spectator)) {
if (!this.finishedGame) sound.moveSound(this.variant, capture);
}
this.checkStatus(msg);
Expand Down

0 comments on commit 8087c45

Please sign in to comment.