Merge pull request #494 from urkerab/switch-sides-sound

Keep the sound playing when switching sides
This commit is contained in:
Guangcong Luo 2015-09-29 12:45:20 -05:00
commit 4e74aa3380
2 changed files with 4 additions and 4 deletions

View File

@ -5878,7 +5878,7 @@ var Battle = (function () {
}
this.soundPause();
};
Battle.prototype.play = function () {
Battle.prototype.play = function (dontResetSound) {
if (this.fastForward) {
this.paused = false;
this.playbackState = 5;
@ -5888,7 +5888,7 @@ var Battle = (function () {
this.soundStop();
}
this.playbackState = 2;
if (!this.done) {
if (!dontResetSound && !this.done) {
this.soundStart();
}
this.nextActivity();

View File

@ -711,10 +711,10 @@
this.battle.fastForwardTo(-1);
} else {
var turn = this.battle.turn;
this.battle.reset();
this.battle.reset(true);
this.battle.switchSides();
if (turn) this.battle.fastForwardTo(turn);
this.battle.play();
this.battle.play(true);
}
},
instantReplay: function () {