summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-04-17 19:43:43 +0000
committermichi_cc <michi_cc@openttd.org>2012-04-17 19:43:43 +0000
commit6f9668330e198a8100aabdc09f612a48887c5c07 (patch)
tree2d49b956ec689c9b10624ab3c328b70c80e761b4 /src/saveload
parent32ab630bda765ba6eb7283d06df88d783ce17865 (diff)
downloadopenttd-6f9668330e198a8100aabdc09f612a48887c5c07.tar.xz
(svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 7cb9f0ff0..b800fe087 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -483,6 +483,10 @@ bool AfterLoadGame()
TileIndex map_size = MapSize();
+ extern TileIndex _cur_tileloop_tile; // From landscape.cpp.
+ /* The LFSR used in RunTileLoop iteration cannot have a zeroed state, make it non-zeroed. */
+ if (_cur_tileloop_tile == 0) _cur_tileloop_tile = 1;
+
if (IsSavegameVersionBefore(98)) GamelogOldver();
GamelogTestRevision();