diff --git a/src/d_main.cpp b/src/d_main.cpp index fe099331c..fa2cc6734 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -315,6 +315,7 @@ FStartupInfo GameStartupInfo; FString lastIWAD; int restart = 0; bool AppActive = true; +bool playedtitlemusic; cycle_t FrameCycles; @@ -1573,7 +1574,8 @@ void D_DoAdvanceDemo (void) gamestate = GS_DEMOSCREEN; pagename = gameinfo.TitlePage; pagetic = (int)(gameinfo.titleTime * TICRATE); - S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false); + if (!playedtitlemusic) S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false); + playedtitlemusic = true; demosequence = 3; pagecount = 0; C_HideConsole (); diff --git a/src/g_game.cpp b/src/g_game.cpp index 836481e99..bfebb4f6b 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -138,6 +138,7 @@ CUSTOM_CVAR (Int, displaynametags, 0, CVAR_ARCHIVE) CVAR(Int, nametagcolor, CR_GOLD, CVAR_ARCHIVE) +extern bool playedtitlemusic; gameaction_t gameaction; gamestate_t gamestate = GS_STARTUP; @@ -1166,7 +1167,7 @@ void G_Ticker () case ga_loadgameplaydemo: G_DoLoadGame (); // fallthrough - case ga_playdemo: + case ga_playdemo: G_DoPlayDemo (); break; case ga_completed: @@ -2934,6 +2935,7 @@ void G_DoPlayDemo (void) usergame = false; demoplayback = true; + playedtitlemusic = false; } }