mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #94 from cinaera/pr_soundpause
Play sounds and envelopes also on pause
This commit is contained in:
commit
69156ab361
|
@ -100,7 +100,7 @@ void CMapLayers::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void
|
|||
}
|
||||
else
|
||||
{
|
||||
if(pThis->m_pClient->m_Snap.m_pGameInfoObj && !(pThis->m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED))
|
||||
if(pThis->m_pClient->m_Snap.m_pGameInfoObj) // && !(pThis->m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED))
|
||||
{
|
||||
if(pItem->m_Version < 2 || pItem->m_Synchronized)
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ void CMapSounds::OnRender()
|
|||
CSourceQueueEntry *pSource = &m_lSourceQueue[i];
|
||||
|
||||
static float s_Time = 0.0f;
|
||||
if(m_pClient->m_Snap.m_pGameInfoObj && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED))
|
||||
if(m_pClient->m_Snap.m_pGameInfoObj) // && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED))
|
||||
{
|
||||
s_Time = mix((Client()->PrevGameTick()-m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick) / (float)Client()->GameTickSpeed(),
|
||||
(Client()->GameTick()-m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick) / (float)Client()->GameTickSpeed(),
|
||||
|
|
Loading…
Reference in a new issue