Tilemap.swap() called twice should not flip values

Repeat calls to swap() should not affect index values a second time.
"swap(1,2); swap(1,2)" should not be the same as "swap(2,1)."

(This also affects Phaser 1.1.6.)
This commit is contained in:
Dan Cox 2014-03-11 23:41:37 -04:00
parent a07cf894a0
commit 5fcc8db8a4

View file

@ -1157,7 +1157,7 @@ Phaser.Tilemap.prototype = {
{
this._results[index].index = this._tempB;
}
else if (value.index === this._tempB)
if (value.index === this._tempB)
{
this._results[index].index = this._tempA;
}