mirror of https://github.com/OpenTTD/OpenTTD
(svn r11666) -Fix (r11504): when removing buoys, return to water or canal depending on their owner
parent
b8196d36e7
commit
a9dafdff48
|
@ -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
|
/* 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,
|
* 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) */
|
* remove it and flood the land (if the canal edge is at level 0) */
|
||||||
MakeWaterOrCanalDependingOnSurroundings(tile, GetTileOwner(tile));
|
MakeWaterOrCanalDependingOnOwner(tile, GetTileOwner(tile));
|
||||||
MarkTileDirtyByTile(tile);
|
MarkTileDirtyByTile(tile);
|
||||||
|
|
||||||
UpdateStationVirtCoordDirty(st);
|
UpdateStationVirtCoordDirty(st);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
void TileLoop_Water(TileIndex tile);
|
void TileLoop_Water(TileIndex tile);
|
||||||
void DrawShipDepotSprite(int x, int y, int image);
|
void DrawShipDepotSprite(int x, int y, int image);
|
||||||
void DrawCanalWater(TileIndex tile);
|
void DrawCanalWater(TileIndex tile);
|
||||||
|
void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o);
|
||||||
void MakeWaterOrCanalDependingOnSurroundings(TileIndex t, Owner o);
|
void MakeWaterOrCanalDependingOnSurroundings(TileIndex t, Owner o);
|
||||||
|
|
||||||
#endif /* WATER_H */
|
#endif /* WATER_H */
|
||||||
|
|
|
@ -140,7 +140,7 @@ CommandCost CmdBuildShipDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
|
||||||
return cost.AddCost(_price.build_ship_depot);
|
return cost.AddCost(_price.build_ship_depot);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o)
|
void MakeWaterOrCanalDependingOnOwner(TileIndex tile, Owner o)
|
||||||
{
|
{
|
||||||
if (o == OWNER_WATER) {
|
if (o == OWNER_WATER) {
|
||||||
MakeWater(tile);
|
MakeWater(tile);
|
||||||
|
|
Loading…
Reference in New Issue