Changed the color cycling's rounding so that it matches up with DDR (and presumably everything else which truncates the number rather than actually rounding).

This commit is contained in:
Matt Denham
2004-02-21 05:20:39 +00:00
parent 8eb0d03a60
commit f4419954a6
+3 -1
View File
@@ -301,7 +301,9 @@ void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAni
int iFrameNo = (int)(fPrecentIntoAnimation*iNumFrames);
if( bVivid )
iFrameNo += (int)( froundf(fNoteBeatFraction,1.f/fAnimationLengthInBeats)*iNumFrames );
// changed to deal with the minor complaint that the color cycling is
// one tick off in general
iFrameNo += (int)( froundf((fNoteBeatFraction + 0.5f/fAnimationLengthInBeats),1.f/fAnimationLengthInBeats)*iNumFrames );
iFrameNo += iNumFrames;
iFrameNo %= iNumFrames;