encapsulate hold results in HoldNoteResult (HoldNoteScore + life)

instead of moving HoldNote::iStartRow forward while a hold note is
held, set HoldNoteResult::iLastHeldRow
fixes hold heads cycling through all note colors while held (wasn't very
visible due to the hold ghost) and GetSuccessfulHands bugs
This commit is contained in:
Glenn Maynard
2004-05-07 04:57:29 +00:00
parent fec42c1a21
commit 9c1a5f6957
6 changed files with 91 additions and 31 deletions
+8 -5
View File
@@ -356,12 +356,15 @@ void PlayerMinus::Update( float fDeltaTime )
m_pNoteField->m_HeldHoldNotes[hn] = bIsHoldingButton && bSteppedOnTapNote;
m_pNoteField->m_ActiveHoldNotes[hn] = bSteppedOnTapNote;
if( bSteppedOnTapNote ) // this note is not judged and we stepped on its head
if( bSteppedOnTapNote )
{
// Move the start of this Hold
const int n = m_pNoteField->GetMatchingHoldNote( hn );
HoldNote &fhn = m_pNoteField->GetHoldNote( n );
fhn.iStartRow = min( iSongRow, fhn.iEndRow );
/* This hold note is not judged and we stepped on its head. Update
* iLastHeldRow. */
HoldNoteResult *hnr = m_pNoteField->CreateHoldNoteResult( hn );
hnr->iLastHeldRow = min( iSongRow, hn.iEndRow );
hnr = this->CreateHoldNoteResult( hn );
hnr->iLastHeldRow = min( iSongRow, hn.iEndRow );
}