Tools/Map Extractor: Fix water height redundancy algorithm ignoring "no water"

This commit is contained in:
killerwife authored and Ovahlord committed 2021-04-05 13:41:44 +02:00
1 parent 490188de76
commit d4b90631fe
4 files changed
+7 -4

No files matched your search

+4 -1
View File
@@ -451,7 +451,7 @@ void ReadLiquidTypeTable()
// 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";
@@ -985,7 +985,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;