Mercurial > hg > openttd
changeset 18048:ee04dc6d65ef draft
(svn r22863) -Fix (r22861): AIOrder::SetOrderCondition didn't accept the new condition
author | yexo <yexo@openttd.org> |
---|---|
date | Thu, 01 Sep 2011 10:04:12 +0000 |
parents | 90467e7dd135 |
children | 41307b50e8c9 |
files | src/ai/api/ai_order.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -336,7 +336,7 @@ { 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); }