diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index 75fcb888c7..ad83e1f71c 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -46,7 +46,7 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float { for( int t=0; tGetTapNote(t, i) != TAP_EMPTY && m_TapNoteScores[t][i] == tns ) + if( this->GetTapNote(t, i) != TAP_EMPTY && GetTapNoteScore(t, i) == tns ) iNumSuccessfulTapNotes++; } } @@ -70,7 +70,7 @@ int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float f if( GetTapNote(t, i) != TAP_EMPTY ) { iNumNotesThisIndex++; - minTapNoteScore = min( minTapNoteScore, m_TapNoteScores[t][i] ); + minTapNoteScore = min( minTapNoteScore, GetTapNoteScore(t, i) ); } } if( iNumNotesThisIndex >= 2 && minTapNoteScore == tns ) @@ -96,7 +96,7 @@ int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const floa bool NoteDataWithScoring::IsRowComplete( int index ) { for( int t=0; tGetCurrentStyleDef()->StyleInputToGameInput( StyleI ); // if they got a bad score or haven't stepped on the corresponding tap yet - const TapNoteScore tns = m_TapNoteScores[hn.m_iTrack][iHoldStartIndex]; + const TapNoteScore tns = GetTapNoteScore(hn.m_iTrack, iHoldStartIndex); const bool bSteppedOnTapNote = tns != TNS_NONE && tns != TNS_MISS; // did they step on the start of this hold? if( hn.m_fStartBeat < fSongBeat && fSongBeat < hn.m_fEndBeat ) // if the song beat is in the range of this hold @@ -364,7 +364,7 @@ void Player::Step( int col ) //LOG->Trace( "Checking Notes[%d]", iCurrentIndexEarlier ); if( iCurrentIndexEarlier >= 0 && GetTapNote(col, iCurrentIndexEarlier) != TAP_EMPTY && // there is a note here - m_TapNoteScores[col][iCurrentIndexEarlier] == TNS_NONE ) // this note doesn't have a score + GetTapNoteScore(col, iCurrentIndexEarlier) == TNS_NONE ) // this note doesn't have a score { iIndexOverlappingNote = iCurrentIndexEarlier; break; @@ -377,7 +377,7 @@ void Player::Step( int col ) //LOG->Trace( "Checking Notes[%d]", iCurrentIndexLater ); if( iCurrentIndexLater >= 0 && GetTapNote(col, iCurrentIndexLater) != TAP_EMPTY && // there is a note here - m_TapNoteScores[col][iCurrentIndexLater] == TNS_NONE ) // this note doesn't have a score + GetTapNoteScore(col, iCurrentIndexLater) == TNS_NONE ) // this note doesn't have a score { iIndexOverlappingNote = iCurrentIndexLater; break; @@ -395,7 +395,7 @@ void Player::Step( int col ) const float fNoteOffset = fBeatsUntilStep / GAMESTATE->m_fCurBPS; //the offset from the actual step in seconds - TapNoteScore &score = m_TapNoteScores[col][iIndexOverlappingNote]; + TapNoteScore score; if( fPercentFromPerfect < PREFSMAN->m_fJudgeWindowPerfectPercent ) score = TNS_PERFECT; else if( fPercentFromPerfect < PREFSMAN->m_fJudgeWindowGreatPercent ) score = TNS_GREAT; @@ -410,6 +410,8 @@ void Player::Step( int col ) bDestroyedNote = (score >= TNS_GOOD); LOG->Trace("(%2d/%2d)Note offset: %f, Score: %i", m_iOffsetSample, SAMPLE_COUNT, fNoteOffset, score); + SetTapNoteScore(col, iIndexOverlappingNote, score); + if (GAMESTATE->m_SongOptions.m_AutoAdjust == SongOptions::ADJUST_ON) { m_fOffset[m_iOffsetSample++] = fNoteOffset; @@ -432,10 +434,10 @@ void Player::Step( int col ) if (score > TNS_NONE) { bool bRowDestroyed = true; - for( int t=0; t= TNS_BOO ) - score = min( score, m_TapNoteScores[t][iIndexThatWasSteppedOn] ); + { + TapNoteScore tns = GetTapNoteScore(t, iIndexThatWasSteppedOn); + if( tns >= TNS_BOO ) + score = min( score, tns ); + } // remove this row from the NoteField // bool bHoldNoteOnThisBeat = false; @@ -539,9 +544,9 @@ int Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ) int iNumMissesThisRow = 0; for( int t=0; t