mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r12072) -Fix: Make docks at sea flood neighboured tiles.
This commit is contained in:
parent
7860d8d18a
commit
918591c05b
@ -2318,6 +2318,9 @@ static void TileLoop_Station(TileIndex tile)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case STATION_DOCK:
|
||||||
|
if (GetTileSlope(tile, NULL) != SLOPE_FLAT) break; // only handle water part
|
||||||
|
/* FALL THROUGH */
|
||||||
case STATION_OILRIG: //(station part)
|
case STATION_OILRIG: //(station part)
|
||||||
case STATION_BUOY:
|
case STATION_BUOY:
|
||||||
TileLoop_Water(tile);
|
TileLoop_Water(tile);
|
||||||
|
@ -864,9 +864,9 @@ static void FloodVehicle(Vehicle *v)
|
|||||||
*/
|
*/
|
||||||
static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
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_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
|
* FLOOD_NONE: canals, rivers, everything else
|
||||||
*/
|
*/
|
||||||
switch (GetTileType(tile)) {
|
switch (GetTileType(tile)) {
|
||||||
@ -888,9 +888,10 @@ static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
|
|||||||
return (GetTreeGround(tile) == TREE_GROUND_SHORE ? FLOOD_DRYUP : FLOOD_NONE);
|
return (GetTreeGround(tile) == TREE_GROUND_SHORE ? FLOOD_DRYUP : FLOOD_NONE);
|
||||||
|
|
||||||
case MP_STATION:
|
case MP_STATION:
|
||||||
if (IsBuoy(tile) && GetWaterClass(tile) == WATER_CLASS_SEA) return FLOOD_ACTIVE;
|
if (IsBuoy(tile) || (IsDock(tile) && GetTileSlope(tile, NULL) == SLOPE_FLAT)) {
|
||||||
if (IsOilRig(tile) || IsDock(tile)) return FLOOD_PASSIVE;
|
return (GetWaterClass(tile) == WATER_CLASS_SEA ? FLOOD_ACTIVE : FLOOD_NONE);
|
||||||
return FLOOD_NONE;
|
}
|
||||||
|
return (IsOilRig(tile) ? FLOOD_PASSIVE : FLOOD_NONE);
|
||||||
|
|
||||||
case MP_INDUSTRY:
|
case MP_INDUSTRY:
|
||||||
return ((GetIndustrySpec(GetIndustryType(tile))->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0 ? FLOOD_PASSIVE : FLOOD_NONE);
|
return ((GetIndustrySpec(GetIndustryType(tile))->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0 ? FLOOD_PASSIVE : FLOOD_NONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user