diff options
author | frosch <frosch@openttd.org> | 2015-06-20 13:11:09 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-06-20 13:11:09 +0000 |
commit | 904688c00a14cadce0c8a651146b305a33d39523 (patch) | |
tree | 6fa9d4952e4ffef06b885e258d692aa8c29c5318 /src/station_cmd.cpp | |
parent | bf64a8c2006bae1734c2f7f1f7dc89b7474597f3 (diff) | |
download | openttd-904688c00a14cadce0c8a651146b305a33d39523.tar.xz |
(svn r27308) -Fix [FS#6283]: Prevent breaking of tram-reversal points by adding more road pieces. (adf88)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 1a641113a..f5ecd727c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -963,7 +963,11 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags /* There is a tram, check if we can build road+tram stop over it. */ if (HasBit(cur_rts, ROADTYPE_TRAM)) { Owner tram_owner = GetRoadOwner(cur_tile, ROADTYPE_TRAM); - if (!_settings_game.construction.road_stop_on_competitor_road && tram_owner != OWNER_NONE) { + if (Company::IsValidID(tram_owner) && + (!_settings_game.construction.road_stop_on_competitor_road || + /* Disallow breaking end-of-line of someone else + * so trams can still reverse on this tile. */ + HasExactlyOneBit(GetRoadBits(cur_tile, ROADTYPE_TRAM)))) { CommandCost ret = CheckOwnership(tram_owner); if (ret.Failed()) return ret; } |