summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-18 21:43:38 +0200
committerErich Eckner <git@eckner.net>2022-01-16 21:58:17 +0100
commit0e56a5e3bf23b73b0238520e6ed2652cfb3988b0 (patch)
tree9369ed67e90c56208d8e265abce34c3ca5dd2ca3
parentb022f8099b1cda066a243d5c4edc708cb02e86a3 (diff)
downloadopenttd-0e56a5e3bf23b73b0238520e6ed2652cfb3988b0.tar.xz
src/genworld.cpp: GenerateWorld(): center on top layer
-rw-r--r--src/genworld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index 587d100b5..fc0f763c3 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -321,7 +321,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
/* Centre the view on the map */
if (FindWindowById(WC_MAIN_WINDOW, 0) != nullptr) {
- ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / 2), true);
+ ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / LayerCount() / 2), true);
}
_GenerateWorld();