summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-09 17:30:13 +0000
committersmatz <smatz@openttd.org>2008-02-09 17:30:13 +0000
commite3301db2134fca18c2dfabe782b4b8a55b0cc0ae (patch)
treee6417e0b62166f7f70376d52251478b4877f5d00 /src/road_cmd.cpp
parent802c94975523114d472cc2c37ccd858d3e6358a2 (diff)
downloadopenttd-e3301db2134fca18c2dfabe782b4b8a55b0cc0ae.tar.xz
(svn r12095) -Fix [FS#1703]: when a company bankrupts, remove drive-through road stops, ship depots and buoys too. Update owners of water and road.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 4711fa052..f0957acb0 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -1413,7 +1413,8 @@ static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID n
}
for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
- if (!HasBit(GetRoadTypes(tile), rt)) continue;
+ /* ROADTYPE_ROAD denotes the tile owner, so update it too */
+ if (rt != ROADTYPE_ROAD && !HasBit(GetRoadTypes(tile), rt)) continue;
if (GetRoadOwner(tile, rt) == old_player) {
SetRoadOwner(tile, rt, new_player == PLAYER_SPECTATOR ? OWNER_NONE : new_player);