diff options
author | frosch <frosch@openttd.org> | 2009-12-02 17:37:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-12-02 17:37:02 +0000 |
commit | 59f9163e37a7da7e8ef1cf52de8aa5e349ead5c1 (patch) | |
tree | 2119cf742c992f2df8b00ca09365f722679628d9 /src/order_cmd.cpp | |
parent | 2265202d7764d861fd3f85d10fd550cf39ba2037 (diff) | |
download | openttd-59f9163e37a7da7e8ef1cf52de8aa5e349ead5c1.tar.xz |
(svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r-- | src/order_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |