From a2f7db0232f92fccdf7fda011fab5cbedbce90e7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 13 Jan 2007 23:46:05 +0000 Subject: [PATCH] split out SetHoldJudgment, like SetJudgment --- stepmania/src/Player.cpp | 18 +++++++++++------- stepmania/src/Player.h | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 83f71c62fb..729012fd8e 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -772,13 +772,7 @@ void Player::Update( float fDeltaTime ) { /* this note has been judged */ HandleHoldScore( tn ); - - if( m_pPlayerStageStats != NULL ) - m_pPlayerStageStats->m_hnsLast = hns; - if( m_pPlayerState->m_mp != MultiPlayer_Invalid ) - MESSAGEMAN->Broadcast( enum_add2(Message_ShowHoldJudgmentMuliPlayerP1,m_pPlayerState->m_mp) ); - - m_vHoldJudgment[iTrack]->SetHoldJudgment( hns ); + SetHoldJudgment( hns, iTrack ); } } } @@ -2242,6 +2236,16 @@ void Player::SetJudgment( TapNoteScore tns, bool bEarly ) m_pJudgment->SetJudgment( tns, bEarly ); } +void Player::SetHoldJudgment( HoldNoteScore hns, int iTrack ) +{ + if( m_pPlayerStageStats != NULL ) + m_pPlayerStageStats->m_hnsLast = hns; + if( m_pPlayerState->m_mp != MultiPlayer_Invalid ) + MESSAGEMAN->Broadcast( enum_add2(Message_ShowHoldJudgmentMuliPlayerP1,m_pPlayerState->m_mp) ); + + m_vHoldJudgment[iTrack]->SetHoldJudgment( hns ); +} + /* * (c) 2001-2006 Chris Danford, Steve Checkoway * All rights reserved. diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index 23b13cd830..c0b1a616de 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -146,6 +146,7 @@ protected: void SendComboMessages( int iOldCombo, int iOldMissCombo ); void SetJudgment( TapNoteScore tns, bool bEarly ); + void SetHoldJudgment( HoldNoteScore hns, int iTrack ); void ChangeLife( TapNoteScore tns ); void ChangeLife( HoldNoteScore hns, TapNoteScore tns );