mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
Change: Only remove orders from primary vehicles
There's no need for disaster, effect vehicles, free wagons or aircraft shadows and rotors to be checked for orders. When a station, waypoint and a depot is removed or when an airport is replaced with another without hangars, remove orders only from primary vehicles.
This commit is contained in:
@@ -1747,6 +1747,8 @@ void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination, bool
|
||||
|
||||
/* Go through all vehicles */
|
||||
for (Vehicle *v : Vehicle::Iterate()) {
|
||||
if (!v->IsPrimaryVehicle()) continue;
|
||||
|
||||
if ((v->type == VEH_AIRCRAFT && v->current_order.IsType(OT_GOTO_DEPOT) && !hangar ? OT_GOTO_STATION : v->current_order.GetType()) == type &&
|
||||
(!hangar || v->type == VEH_AIRCRAFT) && v->current_order.GetDestination() == destination) {
|
||||
v->current_order.MakeDummy();
|
||||
|
Reference in New Issue
Block a user