aboutsummaryrefslogtreecommitdiff
path: root/src/tools/map_extractor
diff options
context:
space:
mode:
authorkillerwife <killerwife@gmail.com>2021-04-04 21:52:57 +0200
committerGitHub <noreply@github.com>2021-04-04 21:52:57 +0200
commit00da074109e713280264761eedfbf6e5dc7ef912 (patch)
tree55ec1fb0ce2a3dba9bfb1f4b0d0f8f10af3253dd /src/tools/map_extractor
parent42877e75e2a67514dfeb185661e4f397b6eb044a (diff)
MapExtraction: Fix water height redundancy algorithm ignoring "no water" (#26324)
* MapExtraction: Fix water height redundancy algorithm ignoring "no water" * Update MMAP_VERSION * Change map version Co-authored-by: jackpoz <giacomopoz@gmail.com>
Diffstat (limited to 'src/tools/map_extractor')
-rw-r--r--src/tools/map_extractor/System.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 58cf2034d95..6b83a7d046d 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -262,7 +262,7 @@ void ReadLiquidTypeTableDBC()
// Map file format data
static char const* MAP_MAGIC = "MAPS";
-static uint32 const MAP_VERSION_MAGIC = 9;
+static uint32 const MAP_VERSION_MAGIC = 10;
static char const* MAP_AREA_MAGIC = "AREA";
static char const* MAP_HEIGHT_MAGIC = "MHGT";
static char const* MAP_LIQUID_MAGIC = "MLIQ";
@@ -781,7 +781,10 @@ bool ConvertADT(std::string const& inputPath, std::string const& outputPath, int
if (minHeight > h) minHeight = h;
}
else
+ {
liquid_height[y][x] = CONF_use_minHeight;
+ if (minHeight > CONF_use_minHeight) minHeight = CONF_use_minHeight;
+ }
}
}
map.liquidMapOffset = map.heightMapOffset + map.heightMapSize;