From f4419954a67d6c229fa9cb5f828f3ffe311ebe2f Mon Sep 17 00:00:00 2001 From: Matt Denham Date: Sat, 21 Feb 2004 05:20:39 +0000 Subject: [PATCH] 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). --- stepmania/src/NoteDisplay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 4d78bf3d24..7dbcc08a27 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -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;