show hold explosion on fLife > 0 and bActive, not just bActive

This commit is contained in:
Chris Danford
2007-03-13 08:38:06 +00:00
parent a8690e25e8
commit e30a2bd2ed
4 changed files with 17 additions and 17 deletions
+9 -9
View File
@@ -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;
}
/*
+3 -3
View File
@@ -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<Actor *> m_Ghost;
vector<bool> m_bHoldIsActive;
vector<bool> m_bHoldWasActive;
vector<bool> m_bIsHoldShowing;
vector<bool> m_bWasHoldShowing;
};
+2 -2
View File
@@ -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 );
+3 -3
View File
@@ -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) );