Feature: Draw infinite water when all borders are water (#13289)

This commit is contained in:
Tyler Trahan
2025-09-26 10:37:27 -04:00
committed by dP
parent e6a05f57e0
commit 25ad0317fb
11 changed files with 105 additions and 24 deletions

View File

@@ -9,6 +9,7 @@
#include "stdafx.h"
#include "heightmap.h"
#include "landscape.h"
#include "clear_map.h"
#include "strings_func.h"
#include "void_map.h"
@@ -523,6 +524,10 @@ bool LoadHeightmap(DetailedFileType dft, std::string_view filename)
GreyscaleToMapHeights(x, y, map);
FixSlopes();
/* If all map borders are water, we will draw infinite water. */
_settings_game.construction.freeform_edges = !IsMapSurroundedByWater();
MarkWholeScreenDirty();
return true;