fix(Tools/Mapextractor): Fix water height redundancy algorithm ignoring "no water" (#10947)

This commit is contained in:
IntelligentQuantum
2022-04-24 22:44:20 +04:30
committed by GitHub
parent 8b531b034b
commit 090cc5e2c6
4 changed files with 11 additions and 4 deletions

View File

@@ -308,7 +308,7 @@ void ReadLiquidTypeTableDBC()
// Map file format data
static char const* MAP_MAGIC = "MAPS";
static uint32 const MAP_VERSION_MAGIC = 8;
static uint32 const MAP_VERSION_MAGIC = 9;
static char const* MAP_AREA_MAGIC = "AREA";
static char const* MAP_HEIGHT_MAGIC = "MHGT";
static char const* MAP_LIQUID_MAGIC = "MLIQ";
@@ -841,7 +841,14 @@ 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;