Mercurial > hg > openttd
changeset 8497:722cc5446e37 draft
(svn r12072) -Fix: Make docks at sea flood neighboured tiles.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 06 Feb 2008 16:19:28 +0000 |
parents | 1a19e49ad645 |
children | c8d80cb33dbd |
files | src/station_cmd.cpp src/water_cmd.cpp |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2318,6 +2318,9 @@ } 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);
--- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -864,9 +864,9 @@ */ 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 @@ 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);