diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 10bf69596d..529298cd61 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -700,7 +700,7 @@ int Player::GetClosestNote( int col, int iNoteRow, int iMaxRowsAhead, int iMaxRo } -void Player::Step( int col, const RageTimer &tm ) +void Player::Step( int col, const RageTimer &tm, bool bHeld ) { bool bOniDead = GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY && @@ -709,12 +709,12 @@ void Player::Step( int col, const RageTimer &tm ) if( bOniDead ) return; // do nothing - HandleStep( col, tm ); + HandleStep( col, tm, bHeld ); MESSAGEMAN->Broadcast( m_sMessageToSendOnStep ); } -void Player::HandleStep( int col, const RageTimer &tm ) +void Player::HandleStep( int col, const RageTimer &tm, bool bHeld ) { //LOG->Trace( "Player::HandlePlayerStep()" ); @@ -722,9 +722,10 @@ void Player::HandleStep( int col, const RageTimer &tm ) ASSERT_M( col >= 0 && col <= m_NoteData.GetNumTracks(), ssprintf("%i, %i", col, m_NoteData.GetNumTracks()) ); // - // Count calories for this step. + // Count calories for this step, unless we're being called because a button is + // held over a mine. // - if( m_pPlayerStageStats && m_pPlayerState ) + if( m_pPlayerStageStats && m_pPlayerState && !bHeld ) { // TODO: remove use of PlayerNumber PlayerNumber pn = m_pPlayerState->m_PlayerNumber; @@ -1198,7 +1199,7 @@ void Player::CrossedMineRow( int iNoteRow ) { bool bIsDown = INPUTMAPPER->IsButtonDown( GameI ); if( bIsDown ) - Step( t, now ); + Step( t, now, true ); } } } diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index 40be600a4c..ffcdb9cde5 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -46,7 +46,7 @@ public: void Load( const NoteData& noteData ); void CrossedRow( int iNoteRow ); void CrossedMineRow( int iNoteRow ); - void Step( int col, const RageTimer &tm ); + void Step( int col, const RageTimer &tm, bool bHeld = false ); void RandomizeNotes( int iNoteRow ); void FadeToFail(); TapNoteScore GetLastTapNoteScore() const { return m_LastTapNoteScore; } @@ -58,7 +58,7 @@ public: NoteData m_NoteData; protected: - void HandleStep( int col, const RageTimer &tm ); + void HandleStep( int col, const RageTimer &tm, bool bHeld ); void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); void OnRowCompletelyJudged( int iStepIndex ); void HandleTapRowScore( unsigned row );