diff options
| -rw-r--r-- | src/tools/map_extractor/System.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index b0fbed1960d..e50eb89bf86 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -891,7 +891,7 @@ bool ConvertADT(ChunkedFile& adt, std::string const& mapName, std::string const& } else { - int minX = 255, minY = 255; + int minX = ADT_GRID_SIZE, minY = ADT_GRID_SIZE; int maxX = 0, maxY = 0; maxHeight = -20000; minHeight = 20000; @@ -927,6 +927,9 @@ bool ConvertADT(ChunkedFile& adt, std::string const& mapName, std::string const& liquidHeader.height = maxY - minY + 1 + 1; liquidHeader.liquidLevel = minHeight; + if (minY > maxY || minX > maxX) + liquidHeader.flags |= map_liquidHeaderFlags::NoHeight; + if (maxHeight == minHeight) liquidHeader.flags |= map_liquidHeaderFlags::NoHeight; |
