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 7fe444ed37
commit c9e0823a2e
11 changed files with 105 additions and 24 deletions
+5
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;