Changeset - r18289:75894706c01a
[Not reviewed]
master
0 1 0
yexo - 13 years ago 2011-11-08 15:53:32
yexo@openttd.org
(svn r23135) -Fix (r23133): always compile before commit
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_order.cpp
Show inline comments
 
@@ -127,13 +127,13 @@ static const int AIOrderPositionToRealOr
 

	
 
/* static */ bool AIOrder::IsConditionalOrder(VehicleID vehicle_id, OrderPosition order_position)
 
{
 
	if (order_position == ORDER_CURRENT) return false;
 
	if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
 

	
 
	const Order *order = ::Vehicle::Get(vehicle_id)->GetOrder(AIOrderPositionToRealOrderPosition(order_position));
 
	const Order *order = ::Vehicle::Get(vehicle_id)->GetOrder(AIOrderPositionToRealOrderPosition(vehicle_id, order_position));
 
	return order->GetType() == OT_CONDITIONAL;
 
}
 

	
 
/* static */ bool AIOrder::IsVoidOrder(VehicleID vehicle_id, OrderPosition order_position)
 
{
 
	if (order_position == ORDER_CURRENT) return false;
 
@@ -425,13 +425,13 @@ static const int AIOrderPositionToRealOr
 
{
 
	EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position));
 
	EnforcePrecondition(false, IsGotoStationOrder(vehicle_id, order_position) || (IsGotoDepotOrder(vehicle_id, order_position) && refit_cargo != CT_AUTO_REFIT));
 
	EnforcePrecondition(false, AICargo::IsValidCargo(refit_cargo) || refit_cargo == CT_AUTO_REFIT || refit_cargo == CT_NO_REFIT);
 

	
 
	uint32 p1 = vehicle_id;
 
	uint32 p2 = refit_cargo | AIOrderPositionToRealOrderPosition(AIOrder::ResolveOrderPosition(vehicle_id, order_position)) << 16;
 
	uint32 p2 = refit_cargo | AIOrderPositionToRealOrderPosition(vehicle_id, AIOrder::ResolveOrderPosition(vehicle_id, order_position)) << 16;
 
	return AIObject::DoCommand(0, p1, p2, CMD_ORDER_REFIT);
 
}
 

	
 
/* static */ bool AIOrder::AppendOrder(VehicleID vehicle_id, TileIndex destination, AIOrderFlags order_flags)
 
{
 
	EnforcePrecondition(false, AIVehicle::IsValidVehicle(vehicle_id));
0 comments (0 inline, 0 general)