Changeset - r22139:2671f020f28f
[Not reviewed]
master
0 1 0
frosch - 9 years ago 2015-06-21 09:31:50
frosch@openttd.org
(svn r27312) -Fix-ish [FS#6317]: Preserve town ownership of bridges when removing road from a road+tram bridge. (marcole)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -237,10 +237,10 @@ static CommandCost RemoveRoad(TileIndex 
 
				SetRoadTypes(tile, GetRoadTypes(tile) & ~RoadTypeToRoadTypes(rt));
 

	
 
				/* If the owner of the bridge sells all its road, also move the ownership
 
				 * to the owner of the other roadtype. */
 
				 * to the owner of the other roadtype, unless the bridge owner is a town. */
 
				RoadType other_rt = (rt == ROADTYPE_ROAD) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
 
				Owner other_owner = GetRoadOwner(tile, other_rt);
 
				if (other_owner != GetTileOwner(tile)) {
 
				if (!IsTileOwner(tile, other_owner) && !IsTileOwner(tile, OWNER_TOWN)) {
 
					SetTileOwner(tile, other_owner);
 
					SetTileOwner(other_end, other_owner);
 
				}
0 comments (0 inline, 0 general)