fix crash when lyrics are too close together

This commit is contained in:
Glenn Maynard
2003-03-30 20:17:00 +00:00
parent 95b0d3e082
commit 848cf152c5
+5
View File
@@ -55,6 +55,11 @@ void LyricDisplay::Update( float fDeltaTime )
const float TweenBufferTime = g_TweenInTime + g_TweenOutTime;
fShowLength = min(fShowLength, Distance - TweenBufferTime);
/* If it's negative, two lyrics are so close together that there's no time
* to tween properly. Lyrics should never be this brief, anyway, so just
* skip it. */
fShowLength = max(fShowLength, 0);
}
m_textLyrics.SetText( GAMESTATE->m_pCurSong->m_LyricSegments[m_iCurLyricNumber].m_sLyric );