summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station_cmd.cpp3
-rw-r--r--src/water_cmd.cpp11
2 files changed, 9 insertions, 5 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 8a60d740c..1762fc754 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2318,6 +2318,9 @@ static void TileLoop_Station(TileIndex tile)
}
break;
+ case STATION_DOCK:
+ if (GetTileSlope(tile, NULL) != SLOPE_FLAT) break; // only handle water part
+ /* FALL THROUGH */
case STATION_OILRIG: //(station part)
case STATION_BUOY:
TileLoop_Water(tile);
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index de620a9e2..4c5484d24 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -864,9 +864,9 @@ static void FloodVehicle(Vehicle *v)
*/
static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
{
- /* FLOOD_ACTIVE: 'single-corner-raised'-coast, sea, sea-shipdepots, sea-buoys, rail with flooded halftile
+ /* FLOOD_ACTIVE: 'single-corner-raised'-coast, sea, sea-shipdepots, sea-buoys, sea-docks (water part), rail with flooded halftile
* FLOOD_DRYUP: coast with more than one corner raised, coast with rail-track, coast with trees
- * FLOOD_PASSIVE: oilrig, dock, water-industries
+ * FLOOD_PASSIVE: oilrig, water-industries
* FLOOD_NONE: canals, rivers, everything else
*/
switch (GetTileType(tile)) {
@@ -888,9 +888,10 @@ static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
return (GetTreeGround(tile) == TREE_GROUND_SHORE ? FLOOD_DRYUP : FLOOD_NONE);
case MP_STATION:
- if (IsBuoy(tile) && GetWaterClass(tile) == WATER_CLASS_SEA) return FLOOD_ACTIVE;
- if (IsOilRig(tile) || IsDock(tile)) return FLOOD_PASSIVE;
- return FLOOD_NONE;
+ if (IsBuoy(tile) || (IsDock(tile) && GetTileSlope(tile, NULL) == SLOPE_FLAT)) {
+ return (GetWaterClass(tile) == WATER_CLASS_SEA ? FLOOD_ACTIVE : FLOOD_NONE);
+ }
+ return (IsOilRig(tile) ? FLOOD_PASSIVE : FLOOD_NONE);
case MP_INDUSTRY:
return ((GetIndustrySpec(GetIndustryType(tile))->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0 ? FLOOD_PASSIVE : FLOOD_NONE);