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>
(cherry picked from commit 00da074109)
This commit is contained in:
killerwife
2021-04-04 21:52:57 +02:00
committed by Shauren
parent 1ba940b17a
commit 2467f799bb
3 changed files with 5 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
#include "DetourNavMesh.h"
const uint32 MMAP_MAGIC = 0x4d4d4150; // 'MMAP'
#define MMAP_VERSION 13
#define MMAP_VERSION 14
struct MmapTileHeader
{

View File

@@ -18,7 +18,7 @@
#include "MapDefines.h"
u_map_magic const MapMagic = { { 'M','A','P','S' } };
uint32 const MapVersionMagic = 9;
uint32 const MapVersionMagic = 10;
u_map_magic const MapAreaMagic = { { 'A','R','E','A' } };
u_map_magic const MapHeightMagic = { { 'M','H','G','T' } };
u_map_magic const MapLiquidMagic = { { 'M','L','I','Q' } };

View File

@@ -878,7 +878,10 @@ bool ConvertADT(ChunkedFile& adt, std::string const& mapName, std::string const&
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;