Skip to content

Commit 59b25ab

Browse files
committed
Animation.setFrame used the wrong frames array if useLocalFrameIndex was false and a numeric frame ID was given (thanks @Skeptron phaserjs#1284)
1 parent e57c700 commit 59b25ab

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Version 2.1.4 - "Bethal" - in development
106106
* Polygon.contains now correctly calculates the result (thanks @pnstickne @BurnedToast #1267)
107107
* Setting Key.enabled = false while it is down did not reset the isDown state (thanks @pnstickne #1190 #1271)
108108
* The Gamepad.addCallbacks context parameter was never actually remembered, causing the callbacks to run in the wrong context (thanks @englercj #1285)
109+
* Animation.setFrame used the wrong frames array if `useLocalFrameIndex` was `false` and a numeric frame ID was given (thanks @Skeptron #1284)
109110

110111

111112
For details about changes made in previous versions of Phaser see the full Change Log at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md

src/animation/Animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Phaser.Animation.prototype = {
273273
{
274274
for (var i = 0; i < this._frames.length; i++)
275275
{
276-
if (this.frames[i] === frameIndex)
276+
if (this._frames[i] === frameIndex)
277277
{
278278
frameIndex = i;
279279
}

0 commit comments

Comments
 (0)