fix interaction between scoring and transforms that insert new notes
This commit is contained in:
@@ -696,9 +696,15 @@ void Player::HandleTapRowScore( unsigned row )
|
|||||||
TapNoteScore scoreOfLastTap = LastTapNoteScore(row);
|
TapNoteScore scoreOfLastTap = LastTapNoteScore(row);
|
||||||
|
|
||||||
int iNumTapsInRow = 0;
|
int iNumTapsInRow = 0;
|
||||||
for( int c=0; c<GetNumTracks(); c++ ) // for each column
|
int iNumAdditions = 0;
|
||||||
if( GetTapNote(c, row) != TAP_EMPTY )
|
for( int t=0; t<GetNumTracks(); t++ ) // for each column
|
||||||
|
{
|
||||||
|
TapNote tn = GetTapNote(t, row);
|
||||||
|
if( tn != TAP_EMPTY )
|
||||||
iNumTapsInRow++;
|
iNumTapsInRow++;
|
||||||
|
if( tn == TAP_ADDITION )
|
||||||
|
iNumAdditions++;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(iNumTapsInRow > 0);
|
ASSERT(iNumTapsInRow > 0);
|
||||||
|
|
||||||
@@ -714,10 +720,10 @@ void Player::HandleTapRowScore( unsigned row )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_pPrimaryScoreKeeper)
|
if(m_pPrimaryScoreKeeper)
|
||||||
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
|
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, iNumAdditions );
|
||||||
|
|
||||||
if(m_pSecondaryScoreKeeper)
|
if(m_pSecondaryScoreKeeper)
|
||||||
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
|
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, iNumAdditions );
|
||||||
|
|
||||||
if (m_pScore)
|
if (m_pScore)
|
||||||
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
|
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
/* Note that pNoteData will include any transformations due to modifiers. */
|
/* Note that pNoteData will include any transformations due to modifiers. */
|
||||||
virtual void OnNextSong( int iSongInCourseIndex, Steps* pNotes, NoteData* pNoteData ) = 0; // before a song plays (called multiple times if course)
|
virtual void OnNextSong( int iSongInCourseIndex, Steps* pNotes, NoteData* pNoteData ) = 0; // before a song plays (called multiple times if course)
|
||||||
|
|
||||||
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ) = 0;
|
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions ) = 0;
|
||||||
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
|
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
|
||||||
|
|
||||||
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) = 0;
|
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) = 0;
|
||||||
|
|||||||
@@ -229,12 +229,18 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
|||||||
GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber] = m_iScore;
|
GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber] = m_iScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
|
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions )
|
||||||
{
|
{
|
||||||
ASSERT( iNumTapsInRow >= 1 );
|
ASSERT( iNumTapsInRow >= 1 );
|
||||||
|
int iNumTapsToScore = iNumTapsInRow-iNumAdditions;
|
||||||
|
|
||||||
// update dance points
|
// Update dance points. Additions don't count.
|
||||||
|
if( iNumTapsToScore > 0 )
|
||||||
|
{
|
||||||
GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
|
GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do count additions in judge totals.
|
||||||
GAMESTATE->m_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
GAMESTATE->m_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
// before a song plays (called multiple times if course)
|
// before a song plays (called multiple times if course)
|
||||||
void OnNextSong( int iSongInCourseIndex, Steps* pNotes, NoteData* pNoteData );
|
void OnNextSong( int iSongInCourseIndex, Steps* pNotes, NoteData* pNoteData );
|
||||||
|
|
||||||
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
|
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions );
|
||||||
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
||||||
|
|
||||||
int TapNoteScoreToDancePoints( TapNoteScore tns );
|
int TapNoteScoreToDancePoints( TapNoteScore tns );
|
||||||
|
|||||||
Reference in New Issue
Block a user