diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 3266b05b3..c802c3197 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -308,20 +308,9 @@ Phaser.AnimationManager.prototype = { if (resetFrame === undefined) { resetFrame = false; } - if (typeof name === 'string') + if (this.currentAnim && (typeof name !== 'string' || name === this.currentAnim.name)) { - if (this._anims[name]) - { - this.currentAnim = this._anims[name]; - this.currentAnim.stop(resetFrame); - } - } - else - { - if (this.currentAnim) - { - this.currentAnim.stop(resetFrame); - } + this.currentAnim.stop(resetFrame); } },