(svn r15684) -Add [NoAI]: AIOrder::SkipToOrder().

This commit is contained in:
yexo
2009-03-12 11:43:40 +00:00
parent 111e2691b0
commit 21daa3fbc9
4 changed files with 20 additions and 1 deletions

View File

@@ -306,6 +306,13 @@ static OrderType GetOrderTypeByTile(TileIndex t)
return AIObject::DoCommand(0, vehicle_id, order_position, CMD_DELETE_ORDER);
}
/* static */ bool AIOrder::SkipToOrder(VehicleID vehicle_id, OrderPosition next_order)
{
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, next_order));
return AIObject::DoCommand(0, vehicle_id, next_order, CMD_SKIP_TO_ORDER);
}
/**
* Callback handler as SetOrderFlags possibly needs multiple DoCommand calls
* to be able to set all order flags correctly. As we need to wait till the