simplify
This commit is contained in:
@@ -94,10 +94,16 @@ void StartQueuedMusic( const RageTimer &when )
|
||||
|
||||
void RageSounds::Update( float fDeltaTime )
|
||||
{
|
||||
if( g_UpdatingTimer )
|
||||
{
|
||||
if( g_Music->IsPlaying() )
|
||||
if( !g_UpdatingTimer )
|
||||
return;
|
||||
|
||||
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.
|
||||
* 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
|
||||
@@ -121,17 +127,11 @@ void RageSounds::Update( float fDeltaTime )
|
||||
/* We're still waiting for the new sound to start playing, so keep using the
|
||||
* old timing data and fake the time. */
|
||||
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
GAMESTATE->UpdateSongPosition( fSeconds, g_Timing );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There's no song playing. Fake it. */
|
||||
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Timing );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CString RageSounds::GetMusicPath() const
|
||||
|
||||
Reference in New Issue
Block a user