mountains do not give sight bonus when on them

This commit is contained in:
givehub99 2020-10-23 09:20:42 -07:00
parent b5ab4bf781
commit 83ad3df5d4

View File

@ -184,7 +184,9 @@ class TileMap {
fun getViewableTiles(position: Vector2, sightDistance: Int): List<TileInfo> {
val viewableTiles = getTilesInDistance(position, 1).toMutableList()
val currentTileHeight = get(position).getHeight()
val tile = get(position)
// mountains do not give sight bonus when on them
val currentTileHeight = if (tile.baseTerrain == Constants.mountain) 0 else tile.getHeight()
for (i in 1..sightDistance) { // in each layer,
// This is so we don't use tiles in the same distance to "see over",