Assertion to catch a div/0 a little earlier.

This commit is contained in:
Glenn Maynard
2003-09-16 00:47:52 +00:00
parent b83760bff0
commit f4682f7255
+2
View File
@@ -276,6 +276,8 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fY
void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor )
{
const int iNumFrames = actorToSet.GetNumStates();
ASSERT( iNumFrames );
float fSongBeat = GAMESTATE->m_fSongBeat;
float fPrecentIntoAnimation = fmodf(fSongBeat,fAnimationLengthInBeats) / fAnimationLengthInBeats;
float fNoteBeatFraction = fmodf( fNoteBeat, 1.0f );