style cleanup

don't touch hold_head_holds in StepStrumHopo
This commit is contained in:
Chris Danford
2007-11-13 04:40:44 +00:00
parent 316314b16c
commit f18813088b
+41 -30
View File
@@ -1001,7 +1001,9 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
bLetGoOfHoldNote = iCheckpointsMissed > 0; bLetGoOfHoldNote = iCheckpointsMissed > 0;
} }
else else
{
bLetGoOfHoldNote = fLife == 0; bLetGoOfHoldNote = fLife == 0;
}
if( bInitiatedNote && !bLetGoOfHoldNote ) if( bInitiatedNote && !bLetGoOfHoldNote )
{ {
@@ -1549,6 +1551,16 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
TapNote &tn = begin->second; TapNote &tn = begin->second;
if( tn.type != TapNote::hold_head ) if( tn.type != TapNote::hold_head )
continue; continue;
switch( tn.subType )
{
DEFAULT_FAIL( tn.subType );
case TapNote::hold_head_hold:
continue;
case TapNote::hold_head_roll:
break;
}
const int iRow = begin->first; const int iRow = begin->first;
HoldNoteScore hns = tn.HoldResult.hns; HoldNoteScore hns = tn.HoldResult.hns;
@@ -1575,39 +1587,30 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
// If the song beat is in the range of this hold: // If the song beat is in the range of this hold:
if( iRow <= iSongRow && iRow <= iEndRow ) if( iRow <= iSongRow && iRow <= iEndRow )
{ {
switch( tn.subType ) if( bInitiatedNote )
{ {
case TapNote::hold_head_hold: // Increase life
// this is handled in Update tn.HoldResult.fLife = 1;
break;
case TapNote::hold_head_roll: // increment combo
if( bInitiatedNote ) const int iOldCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0;
const int iOldMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurMissCombo : 0;
if( m_pPlayerStageStats )
{ {
// Increase life m_pPlayerStageStats->m_iCurCombo++;
tn.HoldResult.fLife = 1; m_pPlayerStageStats->m_iCurMissCombo = 0;
// increment combo
const int iOldCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0;
const int iOldMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurMissCombo : 0;
if( m_pPlayerStageStats )
{
m_pPlayerStageStats->m_iCurCombo++;
m_pPlayerStageStats->m_iCurMissCombo = 0;
}
SendComboMessages( iOldCombo, iOldMissCombo );
if( m_pPlayerStageStats )
SetCombo( m_pPlayerStageStats->m_iCurCombo, m_pPlayerStageStats->m_iCurMissCombo );
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
if( m_pNoteField )
m_pNoteField->DidHoldNote( col, HNS_Held, bBright );
} }
break;
default: SendComboMessages( iOldCombo, iOldMissCombo );
ASSERT(0); if( m_pPlayerStageStats )
SetCombo( m_pPlayerStageStats->m_iCurCombo, m_pPlayerStageStats->m_iCurMissCombo );
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
if( m_pNoteField )
m_pNoteField->DidHoldNote( col, HNS_Held, bBright );
} }
break;
} }
} }
} }
@@ -2405,8 +2408,16 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
TapNote &tn = *iter; TapNote &tn = *iter;
if( tn.type != TapNote::hold_head ) if( tn.type != TapNote::hold_head )
continue; continue;
if( tn.subType != TapNote::hold_head_hold )
switch( tn.subType )
{
DEFAULT_FAIL( tn.subType );
case TapNote::hold_head_hold:
break;
case TapNote::hold_head_roll:
// checkpoints don't apply to rolls
continue; continue;
}
int iStartRow = iter.Row(); int iStartRow = iter.Row();
int iEndRow = iStartRow + tn.iDuration; int iEndRow = iStartRow + tn.iDuration;