track fOverlappedTime for hold notes

This commit is contained in:
Glenn Maynard
2007-01-15 06:35:09 +00:00
parent 6bf9354b06
commit ce407f819f
2 changed files with 12 additions and 3 deletions
+7 -2
View File
@@ -663,11 +663,18 @@ void Player::Update( float fDeltaTime )
if( tn.type != TapNote::hold_head )
continue;
int iRow = begin->first;
int iEndRow = iRow + tn.iDuration;
// set hold flags so NoteField can do intelligent drawing
tn.HoldResult.bHeld = false;
tn.HoldResult.bActive = false;
// If the song beat is in the range of this hold:
if( iRow <= iSongRow && iRow <= iEndRow )
tn.HoldResult.fOverlappedTime += fDeltaTime;
else
tn.HoldResult.fOverlappedTime = 0;
HoldNoteScore hns = tn.HoldResult.hns;
if( hns != HNS_None ) // if this HoldNote already has a result
continue; // we don't need to update the logic for this one
@@ -693,8 +700,6 @@ void Player::Update( float fDeltaTime )
bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp );
}
int iEndRow = iRow + tn.iDuration;
float fLife = tn.HoldResult.fLife;
if( bSteppedOnTapNote && fLife != 0 )
{