show hold explosion on fLife > 0 and bActive, not just bActive
This commit is contained in:
@@ -27,8 +27,8 @@ void GhostArrowRow::Load( const PlayerState* pPlayerState, float fYReverseOffset
|
|||||||
{
|
{
|
||||||
const RString &sButton = GAMESTATE->GetCurrentStyle()->ColToButtonName( c );
|
const RString &sButton = GAMESTATE->GetCurrentStyle()->ColToButtonName( c );
|
||||||
|
|
||||||
m_bHoldIsActive.push_back( false );
|
m_bIsHoldShowing.push_back( false );
|
||||||
m_bHoldWasActive.push_back( false );
|
m_bWasHoldShowing.push_back( false );
|
||||||
|
|
||||||
m_Ghost.push_back( NOTESKIN->LoadActor(sButton, "Explosion", this) );
|
m_Ghost.push_back( NOTESKIN->LoadActor(sButton, "Explosion", this) );
|
||||||
m_Ghost[c]->SetName( "GhostArrow" );
|
m_Ghost[c]->SetName( "GhostArrow" );
|
||||||
@@ -60,14 +60,14 @@ void GhostArrowRow::Update( float fDeltaTime )
|
|||||||
m_Ghost[c]->SetZoom( fZoom );
|
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" );
|
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_Ghost[i]->PlayCommand( "HoldingOff" );
|
||||||
m_bHoldWasActive[i] = m_bHoldIsActive[i];
|
m_bWasHoldShowing[i] = m_bIsHoldShowing[i];
|
||||||
m_bHoldIsActive[i] = false;
|
m_bIsHoldShowing[i] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,10 +115,10 @@ void GhostArrowRow::DidHoldNote( int iCol, HoldNoteScore hns, bool bBright )
|
|||||||
m_Ghost[iCol]->PlayCommand( Capitalize(sJudge) );
|
m_Ghost[iCol]->PlayCommand( Capitalize(sJudge) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GhostArrowRow::SetHoldIsActive( int iCol )
|
void GhostArrowRow::SetHoldShowing( int iCol )
|
||||||
{
|
{
|
||||||
ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() );
|
ASSERT( iCol >= 0 && iCol < (int) m_Ghost.size() );
|
||||||
m_bHoldIsActive[iCol] = true;
|
m_bIsHoldShowing[iCol] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ public:
|
|||||||
|
|
||||||
void DidTapNote( int iCol, TapNoteScore tns, bool bBright );
|
void DidTapNote( int iCol, TapNoteScore tns, bool bBright );
|
||||||
void DidHoldNote( int iCol, HoldNoteScore hns, bool bBright );
|
void DidHoldNote( int iCol, HoldNoteScore hns, bool bBright );
|
||||||
void SetHoldIsActive( int iCol );
|
void SetHoldShowing( int iCol );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_fYReverseOffsetPixels;
|
float m_fYReverseOffsetPixels;
|
||||||
const PlayerState* m_pPlayerState;
|
const PlayerState* m_pPlayerState;
|
||||||
|
|
||||||
vector<Actor *> m_Ghost;
|
vector<Actor *> m_Ghost;
|
||||||
vector<bool> m_bHoldIsActive;
|
vector<bool> m_bIsHoldShowing;
|
||||||
vector<bool> m_bHoldWasActive;
|
vector<bool> m_bWasHoldShowing;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 fStartBeat = NoteRowToBeat( max(tn.HoldResult.iLastHeldRow, iRow) );
|
||||||
float fThrowAway = 0;
|
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;
|
bool bStartIsPastPeak = true;
|
||||||
float fStartYOffset = 0;
|
float fStartYOffset = 0;
|
||||||
if( tn.HoldResult.bActive )
|
if( tn.HoldResult.bActive && tn.HoldResult.fLife > 0 )
|
||||||
; // use the default values filled in above
|
; // use the default values filled in above
|
||||||
else
|
else
|
||||||
fStartYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fStartBeat, fThrowAway, bStartIsPastPeak );
|
fStartYOffset = ArrowEffects::GetYOffset( m_pPlayerState, iCol, fStartBeat, fThrowAway, bStartIsPastPeak );
|
||||||
|
|||||||
@@ -789,10 +789,10 @@ void NoteField::DrawPrimitives()
|
|||||||
bool bIsAddition = (tn.source == TapNote::addition);
|
bool bIsAddition = (tn.source == TapNote::addition);
|
||||||
bool bIsHopoPossible = (tn.bHopoPossible);
|
bool bIsHopoPossible = (tn.bHopoPossible);
|
||||||
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
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;
|
const bool bIsHoldingNote = tn.HoldResult.bHeld;
|
||||||
if( bIsActive )
|
if( bHoldGhostShowing )
|
||||||
m_pCurDisplay->m_GhostArrowRow.SetHoldIsActive( c );
|
m_pCurDisplay->m_GhostArrowRow.SetHoldShowing( c );
|
||||||
|
|
||||||
ASSERT_M( NoteRowToBeat(iStartRow) > -2000, ssprintf("%i %i %i", iStartRow, iEndRow, c) );
|
ASSERT_M( NoteRowToBeat(iStartRow) > -2000, ssprintf("%i %i %i", iStartRow, iEndRow, c) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user