diff options
author | rubidium <rubidium@openttd.org> | 2009-03-02 22:57:47 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-02 22:57:47 +0000 |
commit | 7831346ef8924c757fbd763c225c7b29b665604f (patch) | |
tree | 7514d56ab72b15863906486d7256f8e5dd2cef01 /src/station_map.h | |
parent | 6dd3703a4caafff9a56d878ffac6ce322739067d (diff) | |
download | openttd-7831346ef8924c757fbd763c225c7b29b665604f.tar.xz |
(svn r15601) -Fix [FS#2615]: bridges/tunnels don't store tram owner making it possible to remove someone's tram tracks.
-Feature: allow building road stops on road/tram tracks of competitors.
Diffstat (limited to 'src/station_map.h')
-rw-r--r-- | src/station_map.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/station_map.h b/src/station_map.h index c7d938f3d..d9b0499e4 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -145,19 +145,6 @@ static inline bool IsDriveThroughStopTile(TileIndex t) return IsRoadStopTile(t) && GetStationGfx(t) >= GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET; } -static inline bool GetStopBuiltOnTownRoad(TileIndex t) -{ - assert(IsDriveThroughStopTile(t)); - return HasBit(_m[t].m6, 2); -} - -static inline void SetStopBuiltOnTownRoad(TileIndex t, bool on_town_road) -{ - assert(IsDriveThroughStopTile(t)); - SB(_m[t].m6, 2, 1, on_town_road); -} - - /** * Gets the direction the road stop entrance points towards. */ @@ -341,13 +328,16 @@ static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopTyp { MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), d); SetRoadTypes(t, rt); + SetRoadOwner(t, ROADTYPE_ROAD, o); + SetRoadOwner(t, ROADTYPE_TRAM, o); } -static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, Axis a, bool on_town_road) +static inline void MakeDriveThroughRoadStop(TileIndex t, Owner station, Owner road, Owner tram, StationID sid, RoadStopType rst, RoadTypes rt, Axis a) { - MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a); - SB(_m[t].m6, 2, 1, on_town_road); + MakeStation(t, station, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a); SetRoadTypes(t, rt); + SetRoadOwner(t, ROADTYPE_ROAD, road); + SetRoadOwner(t, ROADTYPE_TRAM, tram); } static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section) |