Update iLastHeldRow even when out of range, to be sure it's clamped
properly. Fixed hold counting glitches.
This commit is contained in:
+13
-14
@@ -367,26 +367,16 @@ void Player::Update( float fDeltaTime )
|
|||||||
|
|
||||||
float fLife = m_NoteData.GetHoldNoteLife(hn);
|
float fLife = m_NoteData.GetHoldNoteLife(hn);
|
||||||
|
|
||||||
// If the song beat is in the range of this hold:
|
|
||||||
if( hn.RowIsInRange(iSongRow) )
|
|
||||||
{
|
|
||||||
bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( GameI );
|
bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( GameI );
|
||||||
|
|
||||||
// TODO: Make the CPU miss sometimes.
|
// TODO: Make the CPU miss sometimes.
|
||||||
if( m_pPlayerState->m_PlayerController != PC_HUMAN )
|
if( m_pPlayerState->m_PlayerController != PC_HUMAN )
|
||||||
bIsHoldingButton = true;
|
bIsHoldingButton = true;
|
||||||
|
|
||||||
// set hold flag so NoteField can do intelligent drawing
|
if( bSteppedOnTapNote && bIsHoldingButton )
|
||||||
if( m_pNoteField )
|
|
||||||
{
|
{
|
||||||
m_pNoteField->m_HeldHoldNotes[hn] = bIsHoldingButton && bSteppedOnTapNote;
|
/* This hold note is not judged and we stepped on its head. Update iLastHeldRow.
|
||||||
m_pNoteField->m_ActiveHoldNotes[hn] = bSteppedOnTapNote;
|
* Do this even if we're a little beyond the end of the hold note, to make sure
|
||||||
}
|
* iLastHeldRow is clamped to iEndRow if the hold note is held all the way. */
|
||||||
|
|
||||||
if( bSteppedOnTapNote )
|
|
||||||
{
|
|
||||||
/* This hold note is not judged and we stepped on its head. Update
|
|
||||||
* iLastHeldRow. */
|
|
||||||
HoldNoteResult *hnr = NULL;
|
HoldNoteResult *hnr = NULL;
|
||||||
|
|
||||||
if( m_pNoteField )
|
if( m_pNoteField )
|
||||||
@@ -399,6 +389,15 @@ void Player::Update( float fDeltaTime )
|
|||||||
hnr->iLastHeldRow = min( iSongRow, hn.iEndRow );
|
hnr->iLastHeldRow = min( iSongRow, hn.iEndRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the song beat is in the range of this hold:
|
||||||
|
if( hn.RowIsInRange(iSongRow) )
|
||||||
|
{
|
||||||
|
// set hold flag so NoteField can do intelligent drawing
|
||||||
|
if( m_pNoteField )
|
||||||
|
{
|
||||||
|
m_pNoteField->m_HeldHoldNotes[hn] = bIsHoldingButton && bSteppedOnTapNote;
|
||||||
|
m_pNoteField->m_ActiveHoldNotes[hn] = bSteppedOnTapNote;
|
||||||
|
}
|
||||||
|
|
||||||
if( bSteppedOnTapNote && bIsHoldingButton )
|
if( bSteppedOnTapNote && bIsHoldingButton )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user