(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 a3bd5f5234
commit 992bc6c345
8 changed files with 25 additions and 14 deletions

View File

@@ -2699,7 +2699,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
if (!rs->IsFreeBay(side)) return VETSB_CANNOT_ENTER;
/* Check if the vehicle is stopping at this road stop */
if (GetRoadStopType(tile) == (IsCargoInClass(rv->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
if (GetRoadStopType(tile) == (rv->IsBus() ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
rv->current_order.GetDestination() == GetStationIndex(tile)) {
SetBit(rv->state, RVS_IS_STOPPING);
rs->AllocateDriveThroughBay(side);