mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
Fix #11785, cf16f45
: when bumping aircraft into the air, remove them from the loading vehicle list again
This commit is contained in:
parent
f99793547e
commit
661bdae2e5
@ -198,6 +198,18 @@ void UpdateOldAircraft()
|
|||||||
SetAircraftPosition(a, gp.x, gp.y, GetAircraftFlightLevel(a));
|
SetAircraftPosition(a, gp.x, gp.y, GetAircraftFlightLevel(a));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear aircraft from loading vehicles, if we bumped them into the air. */
|
||||||
|
for (Station *st : Station::Iterate()) {
|
||||||
|
for (auto iter = st->loading_vehicles.begin(); iter != st->loading_vehicles.end(); /* nothing */) {
|
||||||
|
Vehicle *v = *iter;
|
||||||
|
if (v->type == VEH_AIRCRAFT && !v->current_order.IsType(OT_LOADING)) {
|
||||||
|
iter = st->loading_vehicles.erase(iter);
|
||||||
|
} else {
|
||||||
|
++iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user