Update PutTileAt.js

This commit is contained in:
svipal 2020-02-08 15:51:12 +01:00 committed by GitHub
parent a40ff084f9
commit cf622269e8

View file

@ -37,7 +37,6 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
if (tile instanceof Tile) if (tile instanceof Tile)
{ {
if (layer.data[tileY][tileX] === null) if (layer.data[tileY][tileX] === null)
{ {
layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, layer.tileWidth, layer.tileHeight); 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; var index = tile;
if (layer.data[tileY][tileX] === null) if (layer.data[tileY][tileX] === null)
{ {
layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight); layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight);
} }
else else
@ -68,7 +66,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
{ {
CalculateFacesAt(tileX, tileY, layer); CalculateFacesAt(tileX, tileY, layer);
} }
return newTile; return newTile;
}; };