From e30a2bd2ed21969bc54764598ac6e090c0b82499 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 13 Mar 2007 08:38:06 +0000 Subject: [PATCH] show hold explosion on fLife > 0 and bActive, not just bActive --- stepmania/src/GhostArrowRow.cpp | 18 +++++++++--------- stepmania/src/GhostArrowRow.h | 6 +++--- stepmania/src/NoteDisplay.cpp | 4 ++-- stepmania/src/NoteField.cpp | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/stepmania/src/GhostArrowRow.cpp b/stepmania/src/GhostArrowRow.cpp index cf58f96e1a..91902544fb 100644 --- a/stepmania/src/GhostArrowRow.cpp +++ b/stepmania/src/GhostArrowRow.cpp @@ -27,8 +27,8 @@ void GhostArrowRow::Load( const PlayerState* pPlayerState, float fYReverseOffset { const RString &sButton = GAMESTATE->GetCurrentStyle()->ColToButtonName( c ); - m_bHoldIsActive.push_back( false ); - m_bHoldWasActive.push_back( false ); + m_bIsHoldShowing.push_back( false ); + m_bWasHoldShowing.push_back( false ); m_Ghost.push_back( NOTESKIN->LoadActor(sButton, "Explosion", this) ); m_Ghost[c]->SetName( "GhostArrow" ); @@ -60,14 +60,14 @@ void GhostArrowRow::Update( float fDeltaTime ) m_Ghost[c]->SetZoom( fZoom ); } - for( unsigned i = 0; i < m_bHoldIsActive.size(); ++i ) + for( unsigned i = 0; i < m_bIsHoldShowing.size(); ++i ) { - if( !m_bHoldWasActive[i] && m_bHoldIsActive[i] ) + if( !m_bWasHoldShowing[i] && m_bIsHoldShowing[i] ) m_Ghost[i]->PlayCommand( "HoldingOn" ); - else if( m_bHoldWasActive[i] && !m_bHoldIsActive[i] ) + else if( m_bWasHoldShowing[i] && !m_bIsHoldShowing[i] ) m_Ghost[i]->PlayCommand( "HoldingOff" ); - m_bHoldWasActive[i] = m_bHoldIsActive[i]; - m_bHoldIsActive[i] = false; + m_bWasHoldShowing[i] = m_bIsHoldShowing[i]; + m_bIsHoldShowing[i] = false; } } @@ -115,10 +115,10 @@ void GhostArrowRow::DidHoldNote( int iCol, HoldNoteScore hns, bool bBright ) m_Ghost[iCol]->PlayCommand( Capitalize(sJudge) ); } -void GhostArrowRow::SetHoldIsActive( int iCol ) +void GhostArrowRow::SetHoldShowing( int iCol ) { ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() ); - m_bHoldIsActive[iCol] = true; + m_bIsHoldShowing[iCol] = true; } /* diff --git a/stepmania/src/GhostArrowRow.h b/stepmania/src/GhostArrowRow.h index 9a24bc440e..4c0905a035 100644 --- a/stepmania/src/GhostArrowRow.h +++ b/stepmania/src/GhostArrowRow.h @@ -20,15 +20,15 @@ public: void DidTapNote( int iCol, TapNoteScore tns, bool bBright ); void DidHoldNote( int iCol, HoldNoteScore hns, bool bBright ); - void SetHoldIsActive( int iCol ); + void SetHoldShowing( int iCol ); protected: float m_fYReverseOffsetPixels; const PlayerState* m_pPlayerState; vector m_Ghost; - vector m_bHoldIsActive; - vector m_bHoldWasActive; + vector m_bIsHoldShowing; + vector m_bWasHoldShowing; }; diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index b7e77e602a..357310c947 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -589,10 +589,10 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing float fStartBeat = NoteRowToBeat( max(tn.HoldResult.iLastHeldRow, iRow) ); float fThrowAway = 0; - // HACK: If active, don't set YOffset to 0 so that it doesn't jiggle around the receptor. + // HACK: If life > 0, don't set YOffset to 0 so that it doesn't jiggle around the receptor. bool bStartIsPastPeak = true; float fStartYOffset = 0; - if( tn.HoldResult.bActive ) + if( tn.HoldResult.bActive && tn.HoldResult.fLife > 0 ) ; // use the default values filled in above else fStartYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fStartBeat, fThrowAway, bStartIsPastPeak ); diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 1d8dfacfa5..c895b56b44 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -789,10 +789,10 @@ void NoteField::DrawPrimitives() bool bIsAddition = (tn.source == TapNote::addition); bool bIsHopoPossible = (tn.bHopoPossible); bool bUseAdditionColoring = bIsAddition || bIsHopoPossible; - const bool bIsActive = tn.HoldResult.bActive; + const bool bHoldGhostShowing = tn.HoldResult.bActive && tn.HoldResult.fLife > 0; const bool bIsHoldingNote = tn.HoldResult.bHeld; - if( bIsActive ) - m_pCurDisplay->m_GhostArrowRow.SetHoldIsActive( c ); + if( bHoldGhostShowing ) + m_pCurDisplay->m_GhostArrowRow.SetHoldShowing( c ); ASSERT_M( NoteRowToBeat(iStartRow) > -2000, ssprintf("%i %i %i", iStartRow, iEndRow, c) );