ok actually just remove keepmusic resume stuff

well now it just broke with dynmusic
this sucks, its probably fixable but the code was abysmal so shrug
This commit is contained in:
alufolie91 committed 2026-02-26 01:11:03 +01:00
1 parent 5249cb9a76
commit c0697228ff
1 file changed
+2 -31
+2 -31
View File
@@ -116,9 +116,7 @@ consvar_t cv_ignoremusicchanges = {"ignoremusicchanges", "No", CV_SAVE, CV_YesNo
boolean keepmapmusic = false; // keep the current music on map restart
boolean skipintromus = false; // skip the intro fanfare
static boolean resumekeepmusic = false;
static music_t keepmusic;
static void S_SetKeepMusResume(void);
#ifdef HAVE_OPENMPT
openmpt_module *openmpt_mhandle = NULL;
@@ -1852,8 +1850,6 @@ void S_StopMusic(void)
mapmusic.resume = (cv_resume.value && fasticmp(music.name, mapmusic.name)) ? I_GetSongPosition() : 0;
S_SetKeepMusResume();
if (I_SongPaused())
I_ResumeSong();
@@ -1985,18 +1981,6 @@ boolean S_MapMusPlaying(void)
return S_MusicPlaying() && (strcasecmp(music.name, mapmusic.name) == 0);
}
// saves the current song position everytime a song stops
// so we can resume it in some cases
static void S_SetKeepMusResume(void)
{
keepmusic.resume = 0;
if (fasticmp(music.name, keepmusic.name))
{
keepmusic.resume = I_GetSongPosition();
}
}
// determine if we should keep the music on a map restart
// this gets called BEFORE the level gets loaded in G_DoLoadLevel
void S_KeepMusic(void)
@@ -2004,7 +1988,7 @@ void S_KeepMusic(void)
static INT16 oldmap = -1;
static boolean oldencore = false;
keepmapmusic = resumekeepmusic = false;
keepmapmusic = false;
if (!cv_keepmusic.value)
{
@@ -2018,9 +2002,7 @@ void S_KeepMusic(void)
if (oldmap == gamemap && oldencore == encoremode)
{
const boolean musicchanged = S_CheckMusicException();
resumekeepmusic = (musicchanged && keepmusic.resume);
keepmapmusic = (!musicchanged || resumekeepmusic);
keepmapmusic = (S_CheckMusicException() == false);
}
oldencore = encoremode;
@@ -2081,18 +2063,9 @@ void S_InitMapMusic(void)
if (keepmapmusic)
{
// this is kinda silly, but we can use it to fade back into the map song at the saved point, should the current music be different from the map music
if (resumekeepmusic)
{
S_ChangeMusicEx(mapmusic.name, mapmusic.flags, true, keepmusic.resume, 0, 500);
}
keepmusic.resume = 0;
return;
}
keepmusic.resume = 0;
// Starting ambience should always be restarted
// lug: but not when we keep the map music lol
S_StopMusic();
@@ -2220,8 +2193,6 @@ static void Command_Tunes_f(void)
mapmusic.position = position;
mapmusic.resume = 0;
keepmusic.resume = 0;
S_ChangeMusicEx(mapmusic.name, mapmusic.flags, true, mapmusic.position, 0, 0);
if (argc > 3)