working on finishing checkpoint holds:

track checkpoints missed and hit
allow it to inlfuence the life meter
This commit is contained in:
Glenn Maynard
2007-04-06 23:25:32 +00:00
parent 8864c5b382
commit 8c36383c76
10 changed files with 114 additions and 71 deletions
+13 -16
View File
@@ -2261,7 +2261,8 @@ void Player::CrossedRows( int iFirstRowCrossed, int iLastRowCrossed, const RageT
{
//LOG->Trace( "%d...", r );
vector<int> viColsWithHold;
bool bAllHoldsHeldThisRow = true;
int iNumHoldsHeldThisRow = 0;
int iNumHoldsMissedThisRow = 0;
// start at r-1 so that we consider holds whose end rows are equal to the checkpoint row
NoteData::all_tracks_iterator iter = m_NoteData.GetTapNoteRangeAllTracks( r-1, r, NULL, true );
@@ -2289,7 +2290,10 @@ void Player::CrossedRows( int iFirstRowCrossed, int iLastRowCrossed, const RageT
continue;
viColsWithHold.push_back( iTrack );
bAllHoldsHeldThisRow &= tn.HoldResult.fLife > 0;
if( tn.HoldResult.fLife > 0 )
++iNumHoldsHeldThisRow;
else
++iNumHoldsMissedThisRow;
}
if( !viColsWithHold.empty() )
@@ -2298,21 +2302,14 @@ void Player::CrossedRows( int iFirstRowCrossed, int iLastRowCrossed, const RageT
const int iOldCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0;
const int iOldMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurMissCombo : 0;
if( m_pPlayerStageStats )
{
if( bAllHoldsHeldThisRow )
{
m_pPlayerStageStats->m_iCurCombo++;
m_pPlayerStageStats->m_iCurMissCombo = 0;
}
else
{
m_pPlayerStageStats->m_iCurCombo = 0;
m_pPlayerStageStats->m_iCurMissCombo++;
}
}
if( m_pPrimaryScoreKeeper )
m_pPrimaryScoreKeeper->HandleHoldCheckpointScore( m_NoteData, r, iNumHoldsHeldThisRow, iNumHoldsMissedThisRow );
if( m_pSecondaryScoreKeeper )
m_pSecondaryScoreKeeper->HandleHoldCheckpointScore( m_NoteData, r, iNumHoldsHeldThisRow, iNumHoldsMissedThisRow );
if( bAllHoldsHeldThisRow )
ChangeLife( iNumHoldsMissedThisRow == 0? TNS_CheckpointHit:TNS_CheckpointMiss );
if( iNumHoldsMissedThisRow == 0 )
{
FOREACH( int, viColsWithHold, i )
{