(svn r16388) -Codechange: move u.air to Aircraft

This commit is contained in:
rubidium
2009-05-22 20:07:26 +00:00
parent ada3067960
commit c882248348
13 changed files with 170 additions and 162 deletions

View File

@@ -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();