diff options
author | rubidium <rubidium@openttd.org> | 2009-05-22 20:07:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-22 20:07:26 +0000 |
commit | c882248348510265e1926b0abc031b4c6fb0f97f (patch) | |
tree | e2e97af6a402e4babea7d19de728a50ead416f51 /src/station.cpp | |
parent | ada30679605644a228be26850a76370fea723799 (diff) | |
download | openttd-c882248348510265e1926b0abc031b4c6fb0f97f.tar.xz |
(svn r16388) -Codechange: move u.air to Aircraft
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/station.cpp b/src/station.cpp index 03d7a9db8..97713dfbf 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -70,9 +70,10 @@ Station::~Station() Vehicle *v; FOR_ALL_VEHICLES(v) { - if (v->type == VEH_AIRCRAFT && IsNormalAircraft(v) && v->u.air.targetairport == this->index) { - v->u.air.targetairport = INVALID_STATION; - } + if (v->type != VEH_AIRCRAFT || !IsNormalAircraft(v)) continue; + + Aircraft *a = (Aircraft *)v; + if (a->targetairport == this->index) a->targetairport = INVALID_STATION; } MarkDirty(); |