simplify
This commit is contained in:
@@ -94,10 +94,16 @@ void StartQueuedMusic( const RageTimer &when )
|
|||||||
|
|
||||||
void RageSounds::Update( float fDeltaTime )
|
void RageSounds::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
if( g_UpdatingTimer )
|
if( !g_UpdatingTimer )
|
||||||
{
|
return;
|
||||||
if( g_Music->IsPlaying() )
|
|
||||||
|
if( !g_Music->IsPlaying() )
|
||||||
{
|
{
|
||||||
|
/* There's no song playing. Fake it. */
|
||||||
|
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* There's a delay between us calling Play() and the sound actually playing.
|
/* There's a delay between us calling Play() and the sound actually playing.
|
||||||
* During this time, approximate will be true. Keep using the previous timing
|
* During this time, approximate will be true. Keep using the previous timing
|
||||||
* data until we get a non-approximate time, indicating that the sound has actually
|
* data until we get a non-approximate time, indicating that the sound has actually
|
||||||
@@ -121,16 +127,10 @@ void RageSounds::Update( float fDeltaTime )
|
|||||||
/* We're still waiting for the new sound to start playing, so keep using the
|
/* We're still waiting for the new sound to start playing, so keep using the
|
||||||
* old timing data and fake the time. */
|
* old timing data and fake the time. */
|
||||||
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
GAMESTATE->UpdateSongPosition( fSeconds, g_Timing );
|
GAMESTATE->UpdateSongPosition( fSeconds, g_Timing );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* There's no song playing. Fake it. */
|
|
||||||
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user