summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-02-26 14:07:42 +0000
committersmatz <smatz@openttd.org>2009-02-26 14:07:42 +0000
commit3fdac6f702b0a2e8534b8f1c26faba02118ed8df (patch)
tree0664bda97b6877da1207d3896c81ef561dbf9313 /src/station_cmd.cpp
parenta41b143e58d1290f36ab62fd402953a05e9b7e0b (diff)
downloadopenttd-3fdac6f702b0a2e8534b8f1c26faba02118ed8df.tar.xz
(svn r15588) -Fix: change owner of waypoints and deleted stations when merging companies or when a company benkrupts
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 8c3b1c737..1e19cc55d 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -3120,10 +3120,8 @@ static void ChangeTileOwner_Station(TileIndex tile, Owner old_owner, Owner new_o
if (!IsTileOwner(tile, old_owner)) return;
if (new_owner != INVALID_OWNER) {
- Station *st = GetStationByTile(tile);
-
+ /* for buoys, owner of tile is owner of water, st->owner == OWNER_NONE */
SetTileOwner(tile, new_owner);
- if (!IsBuoy(tile)) st->owner = new_owner; // do not set st->owner for buoys
InvalidateWindowClassesData(WC_STATION_LIST, 0);
} else {
if (IsDriveThroughStopTile(tile)) {