1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 11:29:10 +00:00

Codechange: Make void tiles flood edge tiles, instead of edge tiles flooding themselves (#8517)

This commit is contained in:
SamuXarick
2023-01-26 20:57:25 +00:00
committed by GitHub
parent ede1201b6a
commit 46dc6da270
3 changed files with 8 additions and 13 deletions

View File

@@ -13,7 +13,6 @@
#include "landscape.h"
#include "genworld.h"
#include "viewport_func.h"
#include "water.h"
#include "core/random_func.hpp"
#include "newgrf_generic.h"
#include "landscape_cmd.h"
@@ -248,15 +247,6 @@ static void TileLoopClearDesert(TileIndex tile)
static void TileLoop_Clear(TileIndex tile)
{
/* If the tile is at any edge flood it to prevent maps without water. */
if (_settings_game.construction.freeform_edges && DistanceFromEdge(tile) == 1) {
int z;
if (IsTileFlat(tile, &z) && z == 0) {
DoFloodTile(tile);
MarkTileDirtyByTile(tile);
return;
}
}
AmbientSoundEffect(tile);
switch (_settings_game.game_creation.landscape) {