fix keepmusic resuming not resetting with "tunes" command
this code sucks ass wtf was i cooking if this breaks again i will just wipe it lmao
This commit is contained in:
1 parent
1ec29c1c94
commit
db4cd73912
1 file changed
+7
-2
+7
-2
@@ -1438,7 +1438,7 @@ void S_LoadMusicDefs(UINT16 wadnum)
|
||||
stoken = strtok(stoken, " ");
|
||||
if (stoken)
|
||||
{
|
||||
if (! ReadMusicDefFields(wadnum, line, stoken, &def))
|
||||
if (!ReadMusicDefFields(wadnum, line, stoken, &def))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1982,7 +1982,7 @@ static void S_SetKeepMusResume(void)
|
||||
{
|
||||
keepmusic.resume = 0;
|
||||
|
||||
if (fasticmp(music.name, mapmusic.name))
|
||||
if (fasticmp(music.name, keepmusic.name))
|
||||
{
|
||||
keepmusic.resume = I_GetSongPosition();
|
||||
}
|
||||
@@ -2078,9 +2078,12 @@ void S_InitMapMusic(void)
|
||||
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();
|
||||
@@ -2208,6 +2211,8 @@ 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)
|
||||
|
||||
Reference in new issue
Block a user