From 272535fa17599aa132f5dfc6d8f1e65a2b4cec67 Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Sat, 7 Sep 2024 14:37:57 -0400 Subject: [PATCH] readd back these accidently removed lines and fix crash --- src/p_setup.c | 13 +++++++++---- src/s_sound.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index aef4f0a3b..7a5ff2ee7 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -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"); diff --git a/src/s_sound.h b/src/s_sound.h index c81b271dd..4f2f3d4f0 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -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.