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

View file

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