@@ -1614,25 +1614,25 @@ bool UpdateOrderDest(Vehicle *v, const O
v->dest_tile = v->GetOrderStationLocation(order->GetDestination());
break;
case OT_GOTO_DEPOT:
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
/* We need to search for the nearest depot (hangar). */
TileIndex location;
DestinationID destination;
bool reverse;
if (v->FindClosestDepot(&location, &destination, &reverse)) {
v->dest_tile = location;
v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType());
v->current_order.MakeGoToDepot(destination, v->current_order.GetDepotOrderType(), v->current_order.GetRefitCargo(), v->current_order.GetRefitSubtype());
/* If there is no depot in front, reverse automatically (trains only) */
if (v->type == VEH_TRAIN && reverse) DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_REVERSE_TRAIN_DIRECTION);
if (v->type == VEH_AIRCRAFT && v->u.air.state == FLYING && v->u.air.targetairport != destination) {
/* The aircraft is now heading for a different hangar than the next in the orders */
extern void AircraftNextAirportPos_and_Order(Vehicle *v);
AircraftNextAirportPos_and_Order(v);
}
} else {
UpdateVehicleTimetable(v, true);
v->cur_order_index++;
Status change: