summaryrefslogtreecommitdiff
path: root/src/station_map.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-07 17:52:21 +0000
committerrubidium <rubidium@openttd.org>2007-02-07 17:52:21 +0000
commitd95a87257901d79c95cca6d8447122344c5789d1 (patch)
treec856089e07c3da7ae1a51bcecf7d51741b2583c4 /src/station_map.h
parenteab03792642b93b6e24ac64cd2b2dad203fc2875 (diff)
downloadopenttd-d95a87257901d79c95cca6d8447122344c5789d1.tar.xz
(svn r8619) -Fix: store the ownership of a water tile in the buoy tile and set the ownership of the water tile when the buoy is removed. This solves the issue of removing ownership from canal tiles thus making is possible for other players to remove the canal tile.
Diffstat (limited to 'src/station_map.h')
-rw-r--r--src/station_map.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/station_map.h b/src/station_map.h
index fed210766..1128a39f9 100644
--- a/src/station_map.h
+++ b/src/station_map.h
@@ -287,7 +287,10 @@ static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section
static inline void MakeBuoy(TileIndex t, StationID sid)
{
- MakeStation(t, OWNER_NONE, sid, GFX_BUOY_BASE);
+ /* Make the owner of the buoy tile the same as the current owner of the
+ * water tile. In this way, we can reset the owner of the water to its
+ * original state when the buoy gets removed. */
+ MakeStation(t, GetTileOwner(t), sid, GFX_BUOY_BASE);
}
static inline void MakeDock(TileIndex t, Owner o, StationID sid, DiagDirection d)