diff options
author | frosch <frosch@openttd.org> | 2009-12-02 17:35:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-12-02 17:35:54 +0000 |
commit | 2265202d7764d861fd3f85d10fd550cf39ba2037 (patch) | |
tree | 20d8f4cf71a0b1cbf81d65406d3654e7c1f5af4c /src | |
parent | 9426f2b1737c060cd5d40e525b1801b73c14ef82 (diff) | |
download | openttd-2265202d7764d861fd3f85d10fd550cf39ba2037.tar.xz |
(svn r18380) -Fix (r9301): One could not share orders between buses carrying different cargos.
Diffstat (limited to 'src')
-rw-r--r-- | src/order_cmd.cpp | 5 |
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? */ |