Add setting for map edge behaviour, and how to display area outside map

This commit is contained in:
Jonathan G Rennison
2023-12-22 17:32:44 +00:00
parent 540cec2af5
commit 378a545dd4
9 changed files with 99 additions and 7 deletions

View File

@@ -3544,6 +3544,9 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
* No pools are loaded. References are not possible, and thus do not need resolving. */
SlLoadCheckChunks();
} else {
/* Unconditionally default this to 0 when loading a savegame */
_settings_game.construction.map_edge_mode = 0;
/* Load chunks and resolve references */
SlLoadChunks();
SlFixPointers();
@@ -3676,6 +3679,9 @@ SaveOrLoadResult SaveOrLoad(const std::string &filename, SaveLoadOperation fop,
InitializeGame(256, 256, true, true); // set a mapsize of 256x256 for TTDPatch games or it might get confused
/* Unconditionally default this to 0 when loading a savegame */
_settings_game.construction.map_edge_mode = 0;
/* TTD/TTO savegames have no NewGRFs, TTDP savegame have them
* and if so a new NewGRF list will be made in LoadOldSaveGame.
* Note: this is done here because AfterLoadGame is also called