From 0f63c3d957377f4bd4e1b04e8ea36dfee640481e Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 10 Feb 2010 03:28:13 -0600 Subject: [PATCH] possible fix for handling of delays in autoplay. may also fix things elsewhere (editor?), but that is untested. autoplay seemed to work well with uprock (the song) so I have no complaints. --- src/Player.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Player.cpp b/src/Player.cpp index 3ecc322c07..fb8eefd7c2 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -735,9 +735,6 @@ void Player::Update( float fDeltaTime ) DoStrumMiss(); } - // Check for TapNote misses - UpdateTapNotesMissedOlderThan( GetMaxStepDistanceSeconds() ); - // update pressed flag const int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; ASSERT_M( iNumCols <= MAX_COLS_PER_PLAYER, ssprintf("%i > %i", iNumCols, MAX_COLS_PER_PLAYER) ); @@ -870,12 +867,23 @@ void Player::Update( float fDeltaTime ) { if( GAMESTATE->IsPlayerEnabled(m_pPlayerState) ) { - if(m_bDelay) + if(GAMESTATE->m_bDelay) { - CrossedRows( iRowNow-1, now ); - m_bDelay = false; + if( !m_bDelay ) + m_bDelay = true; + } + else + { + if(m_bDelay) + { + if(m_pPlayerState->m_PlayerController != PC_HUMAN) + { + CrossedRows( iRowNow-1, now ); + } + m_bDelay = false; + } + CrossedRows( iRowNow, now ); } - CrossedRows( iRowNow, now ); } } } @@ -883,6 +891,9 @@ void Player::Update( float fDeltaTime ) // Check for completely judged rows. UpdateJudgedRows(); + // Check for TapNote misses + UpdateTapNotesMissedOlderThan( GetMaxStepDistanceSeconds() ); + // process transforms that are waiting to be applied ApplyWaitingTransforms(); }