round speech fixes

This commit is contained in:
Thibault Duplessis 2019-04-29 18:41:18 +07:00
parent 8d2ebe6ca5
commit 53ab2afee5

View file

@ -205,8 +205,10 @@ export default class RoundController {
userJump = (ply: Ply): void => {
this.cancelMove();
this.chessground.selectSquare(null);
if (!this.jump(ply)) this.redraw();
if (window.Speech) window.Speech.step(this.stepAt(ply));
if (this.jump(ply)) {
if (window.Speech) window.Speech.step(this.stepAt(ply));
}
else this.redraw();
};
isPlaying = () => game.isPlayerPlaying(this.data);
@ -452,7 +454,7 @@ export default class RoundController {
this.onChange();
if (this.keyboardMove) this.keyboardMove.update(step);
if (this.music) this.music.jump(o);
if (window.Speech) window.Speech.step(step, true);
if (window.Speech) window.Speech.step(step, false);
};
private playPredrop = () => {