- fixed RR's music.

This commit is contained in:
Christoph Oelckers 2020-02-05 22:03:42 +01:00
parent 803e57c3b3
commit 67a2952ead
5 changed files with 7 additions and 5 deletions

View file

@ -159,6 +159,7 @@ bool StreamSong::ServiceStream (void *buff, int len)
bool written = m_Source->GetData(buff, len);
if (!written)
{
m_Status = STATE_Stopped;
memset((char*)buff, 0, len);
return false;
}

View file

@ -534,7 +534,7 @@ bool GameInterface::CanSave()
auto &myplayer = *g_player[myconnectindex].ps;
if (sprite[myplayer.i].extra <= 0)
{
P_DoQuote(QUOTE_SAVE_DEAD, &myplayer);
//P_DoQuote(QUOTE_SAVE_DEAD, &myplayer); // handled by the menu.
return false;
}
return true;

View file

@ -413,7 +413,7 @@ bool GameInterface::CanSave()
auto &myplayer = *g_player[myconnectindex].ps;
if (sprite[myplayer.i].extra <= 0)
{
P_DoQuote(QUOTE_SAVE_DEAD, &myplayer);
//P_DoQuote(QUOTE_SAVE_DEAD, &myplayer); // handled by the menu.
return false;
}
return true;

View file

@ -315,7 +315,8 @@ void S_Update(void)
vec3_t* c;
int32_t ca, cs;
if (RR && Mus_IsPlaying())
auto& gm = g_player[myconnectindex].ps->gm;
if (RR && !Mus_IsPlaying() && (gm && gm & MODE_GAME))
S_PlayRRMusic();
S_GetCamera(&c, &ca, &cs);
@ -611,7 +612,7 @@ void S_PlayRRMusic(int newTrack)
g_cdTrack = 2;
FStringf filename("track%02d.ogg", g_cdTrack);
if (Mus_Play(nullptr, 0, false)) return;
if (Mus_Play(nullptr, filename, false)) return;
}
// If none of the tracks managed to start, disable the CD music for this session so that regular music can play if defined.
cd_disabled = true;