changeset 13851:06143488a65f draft

(svn r18380) -Fix (r9301): One could not share orders between buses carrying different cargos.
author frosch <frosch@openttd.org>
date Wed, 02 Dec 2009 17:35:54 +0000
parents da5eda07b403
children 5caf1ea3a9f9
files src/order_cmd.cpp
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1140,9 +1140,8 @@
 			}
 
 			/* 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? */