From 9101de49d8fbc0b1f5e067ca2cd8c5906f30e84a Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 26 Apr 2009 16:14:53 +0000 Subject: (svn r16165) -Add [FS#2801] [NoAI]: several functions to AIOrder to check the what kind of order an order is. -Fix: AIOrder::GetOrderDestination and AIOrder::GetOrderFlags didn't work on ORDER_CURRENT when the vehicle was loading/leaving in a station. --- src/ai/api/ai_vehicle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ai/api/ai_vehicle.cpp') diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp index d0f62136f..130ebe05e 100644 --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -160,6 +160,13 @@ return AIObject::DoCommand(0, vehicle_id, 0, GetCmdSendToDepot(::GetVehicle(vehicle_id))); } +/* static */ bool AIVehicle::SendVehicleToDepotForServicing(VehicleID vehicle_id) +{ + EnforcePrecondition(false, IsValidVehicle(vehicle_id)); + + return AIObject::DoCommand(0, vehicle_id, DEPOT_SERVICE, GetCmdSendToDepot(::GetVehicle(vehicle_id))); +} + /* static */ bool AIVehicle::IsInDepot(VehicleID vehicle_id) { if (!IsValidVehicle(vehicle_id)) return false; -- cgit v1.2.3-54-g00ecf