mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Keep music playing without interruption during map or hubmap transitions if the same file will be playing before and after.
git-svn-id: https://svn.eduke32.com/eduke32@6182 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7d6a0d965b
commit
f26408ea96
1 changed files with 5 additions and 12 deletions
|
@ -422,13 +422,8 @@ void G_CacheMapData(void)
|
|||
if (ud.recstat == 2)
|
||||
return;
|
||||
|
||||
#ifndef EDUKE32_TOUCH_DEVICES
|
||||
S_PauseMusic(1);
|
||||
#endif
|
||||
|
||||
if (g_mapInfo[MUS_LOADING].musicfn)
|
||||
{
|
||||
S_StopMusic();
|
||||
S_PlayMusic(g_mapInfo[MUS_LOADING].musicfn);
|
||||
}
|
||||
|
||||
|
@ -1916,15 +1911,13 @@ int G_EnterLevel(int gameMode)
|
|||
|
||||
if (ud.recstat != 2)
|
||||
{
|
||||
int32_t const mpos = S_GetMusicPosition();
|
||||
|
||||
if (g_mapInfo[mii].musicfn != NULL)
|
||||
if (g_mapInfo[mii].musicfn != NULL &&
|
||||
(g_mapInfo[g_musicIndex].musicfn == NULL ||
|
||||
Bstrcmp(g_mapInfo[g_musicIndex].musicfn, g_mapInfo[mii].musicfn) ||
|
||||
g_musicSize == 0 ||
|
||||
ud.last_level == -1))
|
||||
S_PlayMusic(g_mapInfo[mii].musicfn);
|
||||
|
||||
if (g_mapInfo[g_musicIndex].musicfn != NULL && g_mapInfo[mii].musicfn != NULL
|
||||
&& !Bstrcmp(g_mapInfo[g_musicIndex].musicfn, g_mapInfo[mii].musicfn))
|
||||
S_SetMusicPosition(mpos);
|
||||
|
||||
g_musicIndex = mii;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue