readd back these accidently removed lines and fix crash

This commit is contained in:
NepDisk 2024-09-07 14:37:57 -04:00
parent 8012a21070
commit 272535fa17
2 changed files with 10 additions and 5 deletions

View file

@ -378,9 +378,6 @@ static void P_ClearMapHeaderLighting(mapheader_lighting_t *lighting)
static void P_ClearSingleMapHeaderInfo(INT16 i)
{
const INT16 num = (INT16)(i-1);
UINT8 j;
boolean exists = (mapheaderinfo[gamemap-1]->alreadyExists == true);
mapheaderinfo[num]->lvlttl[0] = '\0';
@ -399,10 +396,18 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
mapheaderinfo[num]->ssspheres = 1;
mapheaderinfo[num]->gravity = DEFAULT_GRAVITY;
mapheaderinfo[num]->keywords[0] = '\0';
for (j = 0; j < MAXMUSNAMES; j++)
for (i = 0; i < MAXMUSNAMES; i++)
mapheaderinfo[num]->musname[i][0] = 0;
mapheaderinfo[num]->mustrack = 0;
mapheaderinfo[num]->muspos = 0;
mapheaderinfo[num]->musinterfadeout = 0;
mapheaderinfo[num]->musintername[0] = 0;
mapheaderinfo[num]->muspostbossname[0] = 0;
mapheaderinfo[num]->muspostbosstrack = 0;
mapheaderinfo[num]->muspostbosspos = 0;
mapheaderinfo[num]->muspostbossfadein = 0;
mapheaderinfo[num]->musforcereset = -1;
mapheaderinfo[num]->forcecharacter[0] = '\0';
mapheaderinfo[num]->musname_size = 0;
mapheaderinfo[num]->weather = PRECIP_NONE;
snprintf(mapheaderinfo[num]->skytexture, 5, "SKY1");

View file

@ -118,7 +118,7 @@ void S_InitSfxChannels(INT32 sfxVolume);
//
void S_StopSounds(void);
void S_ClearSfx(void);
void S_InitLevelMusic(boolean reset);
void S_InitLevelMusic(boolean fromnetsave);
//
// Basically a W_GetNumForName that adds "ds" at the beginning of the string. Returns a lumpnum.