mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow)
This commit is contained in:
parent
1ef953e4a5
commit
6c880d1c20
@ -1371,7 +1371,7 @@ static TileIndex GetStationTileForVehicle(const Vehicle *v, const Station *st)
|
||||
case VEH_TRAIN: return st->train_tile;
|
||||
case VEH_AIRCRAFT: return st->airport_tile;
|
||||
case VEH_SHIP: return st->dock_tile;
|
||||
case VEH_ROAD: return IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? st->bus_stops->xy : st->truck_stops->xy;
|
||||
case VEH_ROAD: return st->GetPrimaryRoadStop(v)->xy;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2278,9 +2278,7 @@ bool CanVehicleUseStation(EngineID engine_type, const Station *st)
|
||||
*/
|
||||
bool CanVehicleUseStation(const Vehicle *v, const Station *st)
|
||||
{
|
||||
if (v->type == VEH_ROAD) {
|
||||
return (st->facilities & (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? FACIL_BUS_STOP : FACIL_TRUCK_STOP)) != 0;
|
||||
}
|
||||
if (v->type == VEH_ROAD) return st->GetPrimaryRoadStop(v) != NULL;
|
||||
|
||||
return CanVehicleUseStation(v->engine_type, st);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user