diff options
author | smatz <smatz@openttd.org> | 2008-02-09 17:30:13 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-02-09 17:30:13 +0000 |
commit | 98e81e95a535f7d940057e79ab46902498d0d067 (patch) | |
tree | e6417e0b62166f7f70376d52251478b4877f5d00 /src/road_cmd.cpp | |
parent | d00bf03012ec14e42e96002be248b2365e44f872 (diff) | |
download | openttd-98e81e95a535f7d940057e79ab46902498d0d067.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.cpp | 3 |
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); |