Fix Hunk size calculation introdused in 371fb99c

Used LUMP_LEAFS instead LUMP_TEXINFO.
This commit is contained in:
Denis Pauk 2023-10-10 01:26:25 +03:00
parent d26c9275f9
commit bd19960ddf
1 changed files with 2 additions and 3 deletions

View File

@ -1913,10 +1913,9 @@ CM_LoadMap(char *name, qboolean clientload, unsigned *checksum)
/* load into heap */
strcpy(cmod.name, name);
/* FIXME: code has some bug in calculation */
int hunkSize = 1024 * 1024 * 4;
int hunkSize = 0;
hunkSize += Mod_CalcLumpHunkSize(&header.lumps[LUMP_LEAFS],
hunkSize += Mod_CalcLumpHunkSize(&header.lumps[LUMP_TEXINFO],
sizeof(texinfo_t), sizeof(mapsurface_t), 0);
if (header.ident == IDBSPHEADER)