summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2011-05-18 12:19:58 +0000
committerplanetmaker <planetmaker@openttd.org>2011-05-18 12:19:58 +0000
commit43c8cd1d5e7d0fa2b7e369eac0239a41ae6c0bb1 (patch)
tree2c682c0fff6be31263f2d3670e6bf718d86b3f4a /src/ai
parentbc6b348e7a67b758fd4de5268941226380e5be24 (diff)
downloadopenttd-43c8cd1d5e7d0fa2b7e369eac0239a41ae6c0bb1.tar.xz
(svn r22473) -Codechange: Automatic orders are better called implicit orders as no real order influencing path finding is added
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_order.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp
index 0c646f052..e784101ee 100644
--- a/src/ai/api/ai_order.cpp
+++ b/src/ai/api/ai_order.cpp
@@ -66,11 +66,11 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
if (order_position == AIOrder::ORDER_INVALID) return NULL;
}
const Order *order = v->orders.list->GetFirstOrder();
- while (order->GetType() == OT_AUTOMATIC) order = order->next;
+ while (order->GetType() == OT_IMPLICIT) order = order->next;
while (order_position > 0) {
order_position = (AIOrder::OrderPosition)(order_position - 1);
order = order->next;
- while (order->GetType() == OT_AUTOMATIC) order = order->next;
+ while (order->GetType() == OT_IMPLICIT) order = order->next;
}
return order;
}
@@ -135,12 +135,12 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
int cur_order_pos = ::Vehicle::Get(vehicle_id)->cur_real_order_index;
const Order *order = ::Vehicle::Get(vehicle_id)->GetOrder(0);
if (order == NULL) return ORDER_INVALID;
- int num_automatic_orders = 0;
+ int num_implicit_orders = 0;
for (int i = 0; i < cur_order_pos; i++) {
- if (order->GetType() == OT_AUTOMATIC) num_automatic_orders++;
+ if (order->GetType() == OT_IMPLICIT) num_implicit_orders++;
order = order->next;
}
- return (AIOrder::OrderPosition)(cur_order_pos - num_automatic_orders);
+ return (AIOrder::OrderPosition)(cur_order_pos - num_implicit_orders);
}
return (order_position >= 0 && order_position < ::Vehicle::Get(vehicle_id)->GetNumManualOrders()) ? order_position : ORDER_INVALID;
}