1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 22:19:08 +00:00

(svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff.

This commit is contained in:
frosch
2009-12-02 17:37:02 +00:00
parent 2265202d77
commit 59f9163e37
8 changed files with 25 additions and 14 deletions

View File

@@ -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;
}