Skip to content

Commit 11c5300

Browse files
committed
Remove dubious use of tile.index to reference the tilesets list (it seems unlikely that there would ever be a tilesets value for every tile, and a huge waste of memory if it was ever done that way).
TODO: look into putting the tileset index (or a tileset reference) into each Tile structure when building them to avoid resolveTilesets entirely too.
1 parent 7533005 commit 11c5300

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/tilemap/TilemapLayerGL.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,7 @@ Phaser.TilemapLayerGL.prototype.renderRegion = function (scrollX, scrollY, left,
732732

733733
var index = tile.index;
734734

735-
var set = tilesets[index];
736-
737-
if (set === undefined)
738-
{
739-
set = this.resolveTileset(index);
740-
}
735+
var set = this.resolveTileset(index);
741736

742737
if (tile.alpha !== lastAlpha && !this.debug)
743738
{

0 commit comments

Comments
 (0)