mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 04:23:01 -05:00
Merge pull request #494 from urkerab/switch-sides-sound
Keep the sound playing when switching sides
This commit is contained in:
commit
4e74aa3380
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user