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
commitc88a6199a7dfc45668da893021d072d4eac6fc5d (patch)
treec063679e6b2160162b5c0ab232ae441833698e1d /src/openttd.cpp
parentbd92143e7bbf9f48008da45fe2c40857f84c3e5c (diff)
downloadopenttd-c88a6199a7dfc45668da893021d072d4eac6fc5d.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;