mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
- fixed RR's music.
This commit is contained in:
parent
803e57c3b3
commit
67a2952ead
5 changed files with 7 additions and 5 deletions
|
@ -159,6 +159,7 @@ bool StreamSong::ServiceStream (void *buff, int len)
|
||||||
bool written = m_Source->GetData(buff, len);
|
bool written = m_Source->GetData(buff, len);
|
||||||
if (!written)
|
if (!written)
|
||||||
{
|
{
|
||||||
|
m_Status = STATE_Stopped;
|
||||||
memset((char*)buff, 0, len);
|
memset((char*)buff, 0, len);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,7 +534,7 @@ bool GameInterface::CanSave()
|
||||||
auto &myplayer = *g_player[myconnectindex].ps;
|
auto &myplayer = *g_player[myconnectindex].ps;
|
||||||
if (sprite[myplayer.i].extra <= 0)
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -413,7 +413,7 @@ bool GameInterface::CanSave()
|
||||||
auto &myplayer = *g_player[myconnectindex].ps;
|
auto &myplayer = *g_player[myconnectindex].ps;
|
||||||
if (sprite[myplayer.i].extra <= 0)
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -315,7 +315,8 @@ void S_Update(void)
|
||||||
vec3_t* c;
|
vec3_t* c;
|
||||||
int32_t ca, cs;
|
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_PlayRRMusic();
|
||||||
|
|
||||||
S_GetCamera(&c, &ca, &cs);
|
S_GetCamera(&c, &ca, &cs);
|
||||||
|
@ -611,7 +612,7 @@ void S_PlayRRMusic(int newTrack)
|
||||||
g_cdTrack = 2;
|
g_cdTrack = 2;
|
||||||
|
|
||||||
FStringf filename("track%02d.ogg", g_cdTrack);
|
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.
|
// 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;
|
cd_disabled = true;
|
||||||
|
|
Loading…
Reference in a new issue