separate search for key to play

This commit is contained in:
Glenn Maynard
2004-10-25 00:46:08 +00:00
parent ef1a3fe1c4
commit b364bb830b
+13 -5
View File
@@ -894,11 +894,6 @@ void PlayerMinus::Step( int col, RageTimer tm )
if( score != TNS_NONE )
m_NoteData.SetTapNoteOffset(col, iIndexOverlappingNote, -fNoteOffset);
if( tn.bKeysound )
{
m_vKeysounds[tn.iKeysoundIndex].Play();
}
if( GAMESTATE->m_PlayerController[m_PlayerNumber] == PC_HUMAN &&
score >= TNS_GREAT )
HandleAutosync(fNoteOffset);
@@ -942,6 +937,19 @@ void PlayerMinus::Step( int col, RageTimer tm )
{
m_pNoteField->Step( col, TNS_NONE );
}
/* Search for keyed sounds separately. If we can't find a nearby note, search
* backwards indefinitely, and ignore grading. */
iIndexOverlappingNote = GetClosestNote( col, fSongBeat,
999999.f,
StepSearchDistance * GAMESTATE->m_fCurBPS * GAMESTATE->m_SongOptions.m_fMusicRate,
true );
if( iIndexOverlappingNote != -1 )
{
TapNote tn = m_NoteData.GetTapNote( col, iIndexOverlappingNote );
if( tn.bKeysound )
m_vKeysounds[tn.iKeysoundIndex].Play();
}
}
void PlayerMinus::HandleAutosync(float fNoteOffset)