diff options
author | yexo <yexo@openttd.org> | 2011-09-01 10:04:12 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-09-01 10:04:12 +0000 |
commit | 8575afa362f626e3ff80d2352b6e132894b978b9 (patch) | |
tree | 271bb314d5771224686c5ba3241be6f4de49a37b /src/ai/api/ai_order.cpp | |
parent | 56c36aed86b25cc48e7195ce728b22365ec91e4a (diff) | |
download | openttd-8575afa362f626e3ff80d2352b6e132894b978b9.tar.xz |
(svn r22863) -Fix (r22861): AIOrder::SetOrderCondition didn't accept the new condition
Diffstat (limited to 'src/ai/api/ai_order.cpp')
-rw-r--r-- | src/ai/api/ai_order.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp index 0d6a1a3df..6c8e69f9b 100644 --- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -336,7 +336,7 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or { EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position)); EnforcePrecondition(false, order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position)); - EnforcePrecondition(false, condition >= OC_LOAD_PERCENTAGE && condition <= OC_UNCONDITIONALLY); + EnforcePrecondition(false, condition >= OC_LOAD_PERCENTAGE && condition <= OC_REMAINING_LIFETIME); return AIObject::DoCommand(0, vehicle_id | (order_position << 20), MOF_COND_VARIABLE | (condition << 4), CMD_MODIFY_ORDER); } |