Long Map Names Port pt 2.

This commit is contained in:
NepDisk 2025-02-05 17:53:53 -05:00
parent 3350b02cc8
commit 954156cd1b
2 changed files with 10 additions and 5 deletions

View file

@ -1073,11 +1073,15 @@ void readlevelheader(MYFILE *f, char * name)
I_Error("Too many maps!");
}
if (mapheaderinfo[num-1])
G_SetGameModified(multiplayer, true); // only mark as a major mod if it replaces an already-existing mapheaderinfo
// Reset all previous map header information
P_AllocMapHeader((INT16)(num-1));
if (num >= nummapheaders)
{
P_AllocMapHeader((INT16)(num -1));
}
else if (f->wad > mainwads)
{
// only mark as a major mod if it replaces an already-existing mapheaderinfo
G_SetGameModified(multiplayer, true);
}
if (mapheaderinfo[num-1]->lumpname == NULL)
{

View file

@ -469,6 +469,7 @@ void P_AllocMapHeader(INT16 i)
if (!mapheaderinfo[i])
{
mapheaderinfo[i] = Z_Malloc(sizeof(mapheader_t), PU_STATIC, NULL);
mapheaderinfo[i]->lumpnum = LUMPERROR;
mapheaderinfo[i]->lumpname = NULL;
mapheaderinfo[i]->flickies = NULL;
mapheaderinfo[i]->grades = NULL;