summaryrefslogtreecommitdiff
path: root/src/script/api/script_order.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-07-14 20:21:36 +0000
committerrubidium <rubidium@openttd.org>2013-07-14 20:21:36 +0000
commit6e12838376d11a88074f1eb40d472bb42d8a015b (patch)
treee9049e337292cf6838082668f4a2500ba05d6581 /src/script/api/script_order.cpp
parent3c300cdc3784bf4fe229e0e7362ec5c423ccca59 (diff)
downloadopenttd-6e12838376d11a88074f1eb40d472bb42d8a015b.tar.xz
(svn r25612) -Fix [FS#5648]: [AI] Don't return ERR_UNKNOWN when trying to move an order to its current location
Diffstat (limited to 'src/script/api/script_order.cpp')
-rw-r--r--src/script/api/script_order.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp
index 8b55cabb4..3087caa65 100644
--- a/src/script/api/script_order.cpp
+++ b/src/script/api/script_order.cpp
@@ -627,6 +627,7 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position_move));
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position_target));
+ EnforcePrecondition(false, order_position_move != order_position_target);
int order_pos_move = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position_move);
int order_pos_target = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position_target);