Fix #6574: Remove go to hangar orders when rebuilding airport

When replacing an airport with another, cancel current orders of type 'go to depot' from aircraft still heading to it if the rebuilt airport doesn't have a hangar (helicopter vs heliport), or if the airplane can't land on the rebuilt airport (airplane vs helistation).

Removes 'go to hangar' orders from all aircraft when replacing an airport with hangar with another without hangar (heliport).
This commit is contained in:
Samu
2018-10-01 16:01:28 +01:00
committed by Michael Lutz
parent 7ac17f5ae4
commit 9b99b95955
5 changed files with 26 additions and 8 deletions

View File

@@ -17,7 +17,7 @@
#include "company_type.h"
/* Functions */
void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination);
void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination, bool hangar = false);
void InvalidateVehicleOrder(const Vehicle *v, int data);
void CheckOrders(const Vehicle*);
void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist = false, bool reset_order_indices = true);