simplify and clarify

This commit is contained in:
Glenn Maynard
2005-04-29 00:20:22 +00:00
parent 4ad1b23244
commit 7bccc2a5fb
+16 -18
View File
@@ -503,27 +503,25 @@ void GameSoundManager::Update( float fDeltaTime )
sLastFile = ThisFile; sLastFile = ThisFile;
} }
if( g_Playing->m_TimingDelayed ) if( g_Playing->m_TimingDelayed && !approximate )
{ {
if( approximate ) /* We've passed the start position of the new sound, so we should be OK.
{ * Load up the new timing data. */
/* We're still waiting for the new sound to start playing, so keep using the g_Playing->m_Timing = g_Playing->m_NewTiming;
* old timing data and fake the time. */ g_Playing->m_LightData = g_Playing->m_NewLightData;
CHECKPOINT_M( ssprintf("%f, delta %f", GAMESTATE->m_fMusicSeconds, fDeltaTime) ); g_Playing->m_TimingDelayed = false;
GAMESTATE->UpdateSongPosition( GAMESTATE->m_fMusicSeconds + fDeltaTime, g_Playing->m_Timing );
return;
}
else
{
/* We've passed the start position of the new sound, so we should be OK.
* Load up the new timing data. */
g_Playing->m_Timing = g_Playing->m_NewTiming;
g_Playing->m_TimingDelayed = false;
}
} }
CHECKPOINT_M( ssprintf("%f", fSeconds) ); if( g_Playing->m_TimingDelayed )
GAMESTATE->UpdateSongPosition( fSeconds+fAdjust, g_Playing->m_Timing, tm+fAdjust ); {
/* 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_Playing->m_Timing );
}
else
{
GAMESTATE->UpdateSongPosition( fSeconds + fAdjust, g_Playing->m_Timing, tm + fAdjust );
}
} }