From 1d88598eafafe642e37491f5745bb1325d50a12d Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Tue, 24 May 2011 10:40:04 +0700 Subject: [PATCH] Revert "finally got it to work with a another hack inside that hack." This reverts commit 73459aae380da05d5f488d7a41a2edb6097ba397. --- src/Actor.cpp | 11 +++++------ src/NoteField.cpp | 5 ----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Actor.cpp b/src/Actor.cpp index 62abfaab16..f8d326827d 100644 --- a/src/Actor.cpp +++ b/src/Actor.cpp @@ -311,11 +311,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties m_pTempState = &tempState; tempState = m_current; - // XXX HACK! We can't really determine the active player outside Draw() so - // figure it out just for this clock type here. - if( m_EffectClock == CLOCK_BGM_BEAT_PLAYER_ACTIVE ) - m_fSecsIntoEffect = g_vfCurrentBGMBeatPlayerNoOffset[m_ActivePlayerNumber]; - const float fTotalPeriod = GetEffectPeriod(); ASSERT( fTotalPeriod > 0 ); const float fTimeIntoEffect = fmodfp( m_fSecsIntoEffect+m_fEffectOffset, fTotalPeriod ); @@ -685,12 +680,16 @@ void Actor::UpdateInternal( float fDeltaTime ) break; } - case CLOCK_BGM_BEAT_PLAYER_ACTIVE: case CLOCK_BGM_BEAT: m_fEffectDelta = g_fCurrentBGMBeat - m_fSecsIntoEffect; m_fSecsIntoEffect = g_fCurrentBGMBeat; break; + case CLOCK_BGM_BEAT_PLAYER_ACTIVE: + m_fEffectDelta = g_vfCurrentBGMBeatPlayer[m_ActivePlayerNumber] - m_fSecsIntoEffect; + m_fSecsIntoEffect = g_vfCurrentBGMBeatPlayerNoOffset[m_ActivePlayerNumber]; + break; + case CLOCK_BGM_BEAT_PLAYER1: m_fEffectDelta = g_vfCurrentBGMBeatPlayer[PLAYER_1] - m_fSecsIntoEffect; m_fSecsIntoEffect = g_vfCurrentBGMBeatPlayerNoOffset[PLAYER_1]; diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 2a3b483d6e..586a982cc4 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -768,8 +768,6 @@ void NoteField::DrawPrimitives() { // XXX Hack: Set Actor's active player number so the notes get the flashing that matches the steps. - // save the active player number (so they can nest) - PlayerNumber pnLastActivePlayerNumber = m_pPlayerState->m_PlayerNumber; Actor::m_ActivePlayerNumber = m_pPlayerState->m_PlayerNumber; //LOG->Trace( "NoteField::DrawPrimitives()" ); @@ -1252,9 +1250,6 @@ void NoteField::DrawPrimitives() } cur->m_GhostArrowRow.Draw(); - - // restore the active player number - Actor::m_ActivePlayerNumber = pnLastActivePlayerNumber; } void NoteField::FadeToFail()