mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40: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);
|
||||
if (!written)
|
||||
{
|
||||
m_Status = STATE_Stopped;
|
||||
memset((char*)buff, 0, len);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -382,7 +382,7 @@ void MessagePump (const SDL_Event &sev)
|
|||
|
||||
if (sev.wheel.y != 0)
|
||||
event.data1 = sev.wheel.y > 0 ? KEY_MWHEELUP : KEY_MWHEELDOWN;
|
||||
else
|
||||
else
|
||||
event.data1 = sev.wheel.x > 0 ? KEY_MWHEELRIGHT : KEY_MWHEELLEFT;
|
||||
|
||||
D_PostEvent (&event);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue