summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
committersmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
commit419f6e099f3b32a8b1f988dd7c912754589bf6d5 (patch)
treec063679e6b2160162b5c0ab232ae441833698e1d /src/openttd.cpp
parent2e2086f3f884487b4f456bd4b4c1e21f96987b59 (diff)
downloadopenttd-419f6e099f3b32a8b1f988dd7c912754589bf6d5.tar.xz
(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index a487262ed..3cbe953b3 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1409,6 +1409,16 @@ bool AfterLoadGame()
/* From this point the old names array is cleared. */
ResetOldNames();
+ /* no station is determined by 'tile == INVALID_TILE' now (instead of '0') */
+ if (CheckSavegameVersion(105)) {
+ Station *st;
+ FOR_ALL_STATIONS(st) {
+ if (st->airport_tile == 0) st->airport_tile = INVALID_TILE;
+ if (st->dock_tile == 0) st->dock_tile = INVALID_TILE;
+ if (st->train_tile == 0) st->train_tile = INVALID_TILE;
+ }
+ }
+
/* convert road side to my format. */
if (_settings_game.vehicle.road_side) _settings_game.vehicle.road_side = 1;