From b868d557f75b1f49b08cd9710f94ccb21d9b60e7 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 28 Jul 2006 07:12:27 +0000 Subject: [PATCH] Merge HandleStep() with Step(). This has one functional change, when using auto play and the AI avoids a mine or misses a note, the message to send on a step isn't sent which makes more sense because a step is being judged as not having happened. --- stepmania/src/Player.cpp | 13 +++---------- stepmania/src/Player.h | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 526f3286d8..e4133838a4 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -930,16 +930,7 @@ void Player::Step( int col, const RageTimer &tm, bool bHeld ) m_pPlayerStageStats->bFailed; if( bOniDead ) return; // do nothing - - HandleStep( col, tm, bHeld ); - - MESSAGEMAN->Broadcast( m_sMessageToSendOnStep ); -} - -void Player::HandleStep( int col, const RageTimer &tm, bool bHeld ) -{ - //LOG->Trace( "Player::HandlePlayerStep()" ); - + DEBUG_ASSERT_M( col >= 0 && col <= m_NoteData.GetNumTracks(), ssprintf("%i, %i", col, m_NoteData.GetNumTracks()) ); @@ -1265,6 +1256,8 @@ void Player::HandleStep( int col, const RageTimer &tm, bool bHeld ) m_vKeysounds[tn.iKeysoundIndex].Play(); } } + + MESSAGEMAN->Broadcast( m_sMessageToSendOnStep ); } static bool Unjudged( const TapNote &tn ) diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index 5927daf59e..93ce141ce5 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -124,7 +124,6 @@ public: bool HasNoteField() const { return m_pNoteField != NULL; } protected: - void HandleStep( int col, const RageTimer &tm, bool bHeld ); void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); void UpdateJudgedRows(); void FlashGhostRow( int iRow, PlayerNumber pn );