Skip to content

Commit

Permalink
Change music on level change
Browse files Browse the repository at this point in the history
Have to say, that condition in S_Start was well hidden!
  • Loading branch information
JNechaevsky committed Oct 30, 2023
1 parent be241f2 commit 9f1da17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/doom/s_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "p_local.h"
#include "w_wad.h"
#include "z_zone.h"
#include "g_game.h" // [crispy] demo_gotonextlvl

// when to clip out sounds
// Does not fit the large outdoor areas.
Expand Down Expand Up @@ -440,7 +441,7 @@ void S_Start(void)
{
const short curmap = (gameepisode << 8) + gamemap;

if (prevmap == curmap || (nodrawers && singletics))
if (prevmap == curmap || (nodrawers && singletics && !demo_gotonextlvl))
return;

prevmap = curmap;
Expand Down Expand Up @@ -933,7 +934,7 @@ void S_ChangeMusic(int musicnum, int looping)
musinfo.current_item = -1;

// [crispy] play no music if this is not the right map
if (nodrawers && singletics)
if (nodrawers && singletics && !demo_gotonextlvl)
return;

// [crispy] restart current music if IDMUS00 is entered
Expand Down

0 comments on commit 9f1da17

Please sign in to comment.