mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
Fixed bad spread of starting positions
This commit is contained in:
parent
f67412291c
commit
bf1850cf2e
@ -214,17 +214,17 @@ class TileMap : IsPartOfGameInfoSerialization {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
sequence {
|
sequence {
|
||||||
for (column in 0 until rectangle.width.toInt()) {
|
for (rectColumnNumber in 0 until rectangle.width.toInt()) {
|
||||||
for (row in 0 until rectangle.height.toInt()) {
|
for (rectRowNumber in 0 until rectangle.height.toInt()) {
|
||||||
val currentX = rectangle.x + column
|
val worldColumnNumber = rectangle.x.toInt() + rectColumnNumber
|
||||||
val currentY = rectangle.y + row
|
val worldRowNumber = rectangle.y.toInt() + rectRowNumber
|
||||||
|
|
||||||
if (rowsAndColumns) {
|
if (rowsAndColumns) {
|
||||||
val hexCoords = HexMath.getTileCoordsFromColumnRow(column, row)
|
val hexCoords = HexMath.getTileCoordsFromColumnRow(worldColumnNumber, worldRowNumber)
|
||||||
yield(getIfTileExistsOrNull(hexCoords.x.toInt(), hexCoords.y.toInt()))
|
yield(getIfTileExistsOrNull(hexCoords.x.toInt(), hexCoords.y.toInt()))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
yield(getIfTileExistsOrNull(currentX.toInt(), currentY.toInt()))
|
yield(getIfTileExistsOrNull(worldColumnNumber, worldRowNumber))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.filterNotNull()
|
}.filterNotNull()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user