From cf622269e8f70885ef47664ae4248ab9a35a5e77 Mon Sep 17 00:00:00 2001 From: svipal <48034417+svipal@users.noreply.github.com> Date: Sat, 8 Feb 2020 15:51:12 +0100 Subject: [PATCH] Update PutTileAt.js --- src/tilemaps/components/PutTileAt.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tilemaps/components/PutTileAt.js b/src/tilemaps/components/PutTileAt.js index 2dcfe1237..5930f8847 100644 --- a/src/tilemaps/components/PutTileAt.js +++ b/src/tilemaps/components/PutTileAt.js @@ -37,7 +37,6 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) if (tile instanceof Tile) { - if (layer.data[tileY][tileX] === null) { layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, layer.tileWidth, layer.tileHeight); @@ -49,7 +48,6 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) var index = tile; if (layer.data[tileY][tileX] === null) { - layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight); } else @@ -68,7 +66,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) { CalculateFacesAt(tileX, tileY, layer); } - + return newTile; };