summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/order_cmd.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 7764ac76d..0573ea655 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1140,9 +1140,8 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
}
/* Trucks can't share orders with busses (and visa versa) */
- if (src->type == VEH_ROAD) {
- if (src->cargo_type != dst->cargo_type && (IsCargoInClass(src->cargo_type, CC_PASSENGERS) || IsCargoInClass(dst->cargo_type, CC_PASSENGERS)))
- return CMD_ERROR;
+ if (src->type == VEH_ROAD && IsCargoInClass(src->cargo_type, CC_PASSENGERS) != IsCargoInClass(dst->cargo_type, CC_PASSENGERS)) {
+ return CMD_ERROR;
}
/* Is the vehicle already in the shared list? */