fix invisible notes near beginning of song with ProgressAlternate

This commit is contained in:
Flameshadowxeroshin
2018-01-17 15:07:57 -06:00
parent c731828f44
commit 07918fe3ab
+3 -2
View File
@@ -1339,9 +1339,10 @@ void NoteDisplay::DrawActor(const TapNote& tn, Actor* pActor, NotePart part,
break; break;
case NoteColorType_ProgressAlternate: case NoteColorType_ProgressAlternate:
fScaledBeat = fBeat * cache->m_iNoteColorCount[part]; fScaledBeat = fBeat * cache->m_iNoteColorCount[part];
//knock it back into the last frame if it's on a boundary
if( fScaledBeat - int64_t(fScaledBeat) == 0.0f ) if( fScaledBeat - int64_t(fScaledBeat) == 0.0f )
fScaledBeat -= 1.0f; //we're on a boundary, so move to the previous frame.
//doing it this way ensures that fScaledBeat is never negative so fmodf works.
fScaledBeat += cache->m_iNoteColorCount[part] - 1;
color = fmodf( ceilf( fScaledBeat ), (float)cache->m_iNoteColorCount[part] ); color = fmodf( ceilf( fScaledBeat ), (float)cache->m_iNoteColorCount[part] );
break; break;
default: default: