summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-12-19 02:41:25 +0000
committerglx <glx@openttd.org>2007-12-19 02:41:25 +0000
commit41e8396f574f958d7ecc016f4c7cc8260e846fa4 (patch)
tree69290a588f557e9b28580c1bd265bd6f4ab47dd5
parent0223de544257c0771e62fed5abe8159f0d1a50d5 (diff)
downloadopenttd-41e8396f574f958d7ecc016f4c7cc8260e846fa4.tar.xz
(svn r11666) -Fix (r11504): when removing buoys, return to water or canal depending on their owner
-rw-r--r--src/station_cmd.cpp2
-rw-r--r--src/water.h1
-rw-r--r--src/water_cmd.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 9d47cfb22..38a1af494 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1908,7 +1908,7 @@ static CommandCost RemoveBuoy(Station *st, uint32 flags)
/* We have to set the water tile's state to the same state as before the
* buoy was placed. Otherwise one could plant a buoy on a canal edge,
* remove it and flood the land (if the canal edge is at level 0) */
- MakeWaterOrCanalDependingOnSurroundings(tile, GetTileOwner(tile));
+ MakeWaterOrCanalDependingOnOwner(tile, GetTileOwner(tile));
MarkTileDirtyByTile(tile);
UpdateStationVirtCoordDirty(st);
diff --git a/src/water.h b/src/water.h
index e279119f1..27f411e0f 100644
--- a/src/water.h
+++ b/src/water.h
@@ -8,6 +8,7 @@
void TileLoop_Water(TileIndex tile);
void DrawShipDepotSprite(int x, int y, int image);
void DrawCanalWater(TileIndex tile);
+void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o);
void MakeWaterOrCanalDependingOnSurroundings(TileIndex t, Owner o);
#endif /* WATER_H */
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 5529b8a3c..f26e3a109 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -140,7 +140,7 @@ CommandCost CmdBuildShipDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
return cost.AddCost(_price.build_ship_depot);
}
-static void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o)
+void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o)
{
if (o == OWNER_WATER) {
MakeWater(tile);