Fix crashes from racing conditions in animations

This commit is contained in:
Ivo Julca
2014-11-25 23:05:14 -05:00
parent dc11c215f9
commit c46d22cf09

View File

@@ -5601,6 +5601,7 @@ var Battle = (function () {
this.fastForward = time;
this.elem.append('<div class="seeking"><strong>seeking...</strong></div>');
$.fx.off = true;
this.elem.find(':animated').finish();
this.swapQueues();
this.nextActivity();
return;
@@ -5609,6 +5610,7 @@ var Battle = (function () {
this.fastForward = time;
this.elem.append('<div class="seeking"><strong>seeking...</strong></div>');
$.fx.off = true;
this.elem.find(':animated').finish();
if (this.yourSide.active[0] && this.yourSide.active[0].sprite) {
this.yourSide.active[0].sprite.animReset();
}