diff options
author | rubidium <rubidium@openttd.org> | 2007-08-24 19:19:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-24 19:19:18 +0000 |
commit | 8a86526d0531be07b012bd216417e485bfdd559b (patch) | |
tree | 4ba5c20c99a256e84546732ef66ef1a12b6255a1 /src/station.h | |
parent | 6c061ecfb491ab0cfc6665156ad7bed316ccb3e8 (diff) | |
download | openttd-8a86526d0531be07b012bd216417e485bfdd559b.tar.xz |
(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.
Diffstat (limited to 'src/station.h')
-rw-r--r-- | src/station.h | 26 |
1 files changed, 15 insertions, 11 deletions
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<RoadStop, RoadStopID, &_RoadStop_pool> { 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<Station, StationID, &_Station_pool> { - 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; |