From bb368f880bc6813b7fe71414ea5c6f74af3ae36e Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 24 Aug 2007 19:19:18 +0000 Subject: (svn r10974) -Fix [FS#1144, FS#1155]: road vehicles that could not (properly) use a road stop still tried to go to that road stop. --- src/station.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/station.h') diff --git a/src/station.h b/src/station.h index 866375a42..5790c0c6a 100644 --- a/src/station.h +++ b/src/station.h @@ -70,6 +70,8 @@ struct RoadStop : PoolItem { void FreeBay(uint nr); bool IsEntranceBusy() const; void SetEntranceBusy(bool busy); + + RoadStop *GetNextRoadStop(const Vehicle *v) const; }; struct StationSpecList { @@ -102,17 +104,19 @@ struct StationRect : public Rect { }; struct Station : PoolItem { - public: - RoadStop *GetPrimaryRoadStop(RoadStop::Type type) const - { - return type == RoadStop::BUS ? bus_stops : truck_stops; - } - - const AirportFTAClass *Airport() const - { - if (airport_tile == 0) return GetAirport(AT_DUMMY); - return GetAirport(airport_type); - } +public: + RoadStop *GetPrimaryRoadStop(RoadStop::Type type) const + { + return type == RoadStop::BUS ? bus_stops : truck_stops; + } + + RoadStop *GetPrimaryRoadStop(const Vehicle *v) const; + + const AirportFTAClass *Airport() const + { + if (airport_tile == 0) return GetAirport(AT_DUMMY); + return GetAirport(airport_type); + } TileIndex xy; RoadStop *bus_stops; -- cgit v1.2.3-54-g00ecf