[7439] Fix wrong liquid level in some places. Need reectract maps.

Remove some log on extract maps.
Add liquid status log to .gps command

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-03-11 00:04:19 +03:00
parent a2bb5aa9ed
commit 071a0317f0
11 changed files with 28 additions and 11 deletions

View file

@ -207,7 +207,7 @@ void ReadLiquidTypeTableDBC()
// Map file format data
#define MAP_MAGIC 'SPAM'
#define MAP_VERSION_MAGIC '0.1v'
#define MAP_VERSION_MAGIC '0.1w'
#define MAP_AREA_MAGIC 'AERA'
#define MAP_HEIGTH_MAGIC 'TGHM'
#define MAP_LIQUID_MAGIC 'QILM'
@ -304,7 +304,6 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
memset(liquid_show, 0, sizeof(liquid_show));
memset(liquid_type, 0, sizeof(liquid_type));
memset(liquid_height, 0, sizeof(liquid_height));
// Prepare map header
map_fileheader map;
@ -709,6 +708,8 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
if (maxHeight < h) maxHeight = h;
if (minHeight > h) minHeight = h;
}
else
liquid_height[y][x] = CONF_use_minHeight;
}
}
map.liquidMapOffset = map.heightMapOffset + map.heightMapSize;
@ -812,11 +813,11 @@ void ExtractMapsFromMpq()
printf("Convert map files\n");
for(uint32 z = 0; z < map_count; ++z)
{
printf("Extract %s (%d/%d) \n", map_ids[z].name, z, map_count);
printf("Extract %s (%d/%d) \n", map_ids[z].name, z+1, map_count);
// Loadup map grid data
sprintf(mpq_map_name, "World\\Maps\\%s\\%s.wdt", map_ids[z].name, map_ids[z].name);
WDT_file wdt;
if (!wdt.loadFile(mpq_map_name))
if (!wdt.loadFile(mpq_map_name, false))
{
// printf("Error loading %s map wdt data\n", map_ids[z].name);
continue;