Fix creating 105x90 rectangular no-wrap maps (#11144)

This commit is contained in:
SomeTroglodyte 2024-02-17 20:43:17 +01:00 committed by GitHub
parent cc7b8cd26c
commit 7dc398184f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -465,8 +465,8 @@ class TileMap(initialCapacity: Int = 10) : IsPartOfGameInfoSerialization {
} }
} else { } else {
// Yes the map generator calls this repeatedly, and we don't want to end up with an oversized tileMatrix // Yes the map generator calls this repeatedly, and we don't want to end up with an oversized tileMatrix
// rightX is -leftX or -leftX + 1 or -leftX + 2 // rightX is between -leftX - 1 (e.g. 105x90 map thanks @ravignir) and -leftX + 2
check(tileMatrix.size in (1 - 2 * leftX)..(3 - 2 * leftX)) { check(tileMatrix.size in (- 2 * leftX)..(3 - 2 * leftX)) {
"TileMap.setTransients called on existing tileMatrix of different size" "TileMap.setTransients called on existing tileMatrix of different size"
} }
} }