summaryrefslogtreecommitdiff
path: root/src/oldloader.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/oldloader.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/oldloader.cpp')
-rw-r--r--src/oldloader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index 942b4eb0a..2e072b76d 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -685,9 +685,11 @@ static bool LoadOldStation(LoadgameState *ls, int num)
if (!LoadChunk(ls, st, station_chunk))
return false;
- if (st->IsValid()) {
+ if (st->xy != 0) {
st->town = GetTown(REMAP_TOWN_IDX(_old_town_index));
st->string_id = RemapOldStringID(_old_string_id);
+ } else {
+ st->xy = INVALID_TILE;
}
return true;