summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-28 11:51:31 +0000
committertruelight <truelight@openttd.org>2004-12-28 11:51:31 +0000
commit2f9e0b8e0ca58ed9cbb907170631294baa706156 (patch)
tree31c4abf8c556a50cc2cb6846bddb8f40f21986c9 /misc.c
parent16cd779efe9afff09afe7ec5a930b50fa8365d3b (diff)
downloadopenttd-2f9e0b8e0ca58ed9cbb907170631294baa706156.tar.xz
(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and loaded as
an uint8 till the savegame version is bumped to version 5. Then it works automaticly as a fully uint16. So _stations[] can not be increased till after the bump!!
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 34ad3bfac..a96d09eb1 100644
--- a/misc.c
+++ b/misc.c
@@ -837,7 +837,12 @@ static void SaveLoad_MAPT() {
}
static void SaveLoad_MAP2() {
- SlArray(_map2, MapSize(), SLE_UINT8);
+ if (_sl.version < 5) {
+ /* In those versions the _map2 was 8 bits */
+ SlArray(_map2, MapSize(), SLE_FILE_U8 | SLE_VAR_U16);
+ } else {
+ SlArray(_map2, MapSize(), SLE_UINT16);
+ }
}
static void SaveLoad_M3LO() {