From 59f9163e37a7da7e8ef1cf52de8aa5e349ead5c1 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 2 Dec 2009 17:37:02 +0000 Subject: (svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff. --- src/order_cmd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/order_cmd.cpp') diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 0573ea655..a912b328f 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -15,7 +15,6 @@ #include "company_func.h" #include "news_func.h" #include "vehicle_gui.h" -#include "cargotype.h" #include "strings_func.h" #include "functions.h" #include "window_func.h" @@ -1140,7 +1139,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } /* Trucks can't share orders with busses (and visa versa) */ - if (src->type == VEH_ROAD && IsCargoInClass(src->cargo_type, CC_PASSENGERS) != IsCargoInClass(dst->cargo_type, CC_PASSENGERS)) { + if (src->type == VEH_ROAD && RoadVehicle::From(src)->IsBus() != RoadVehicle::From(dst)->IsBus()) { return CMD_ERROR; } -- cgit v1.2.3-54-g00ecf