(svn r16199) -Codechange: Pass OrderNonStopFlags also to MakeGoToDepotOrder().

-Fix: 'Go non-stop to nearest depot'-orders did not work wrt. the 'non-stop' part.
-Fix: Adding 'Go to nearest depot'-orders did not respect the default setting for 'non-stop'.
This commit is contained in:
frosch
2009-05-02 00:10:24 +00:00
parent cf0bc6e649
commit ac1b753f9a
4 changed files with 20 additions and 20 deletions

View File

@@ -340,10 +340,10 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
* to a depot (other vehicle types). */
if (::GetVehicle(vehicle_id)->type == VEH_AIRCRAFT) {
if (!::IsTileType(destination, MP_STATION)) return false;
order.MakeGoToDepot(::GetStationIndex(destination), odtf, odaf);
order.MakeGoToDepot(::GetStationIndex(destination), odtf, ONSF_STOP_EVERYWHERE, odaf);
} else {
if (::IsTileType(destination, MP_STATION)) return false;
order.MakeGoToDepot(::GetDepotByTile(destination)->index, odtf, odaf);
order.MakeGoToDepot(::GetDepotByTile(destination)->index, odtf, ONSF_STOP_EVERYWHERE, odaf);
}
break;
}