Pressing a lower extra fret during a single fret hold breaks the hold. Pressing any extra fret during a two fret hold breaks the hold.
This commit is contained in:
@@ -1282,6 +1282,40 @@ void Player::Fret( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
|
|
||||||
if( bDoHopo )
|
if( bDoHopo )
|
||||||
Hopo( iHopoCol, row, tm, bHeld, bRelease );
|
Hopo( iHopoCol, row, tm, bHeld, bRelease );
|
||||||
|
|
||||||
|
|
||||||
|
// Check if this fret breaks all active holds.
|
||||||
|
if( !bRelease )
|
||||||
|
{
|
||||||
|
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||||
|
const int iSongRow = BeatToNoteRow( fSongBeat );
|
||||||
|
|
||||||
|
int iMaxHoldCol = -1;
|
||||||
|
int iNumColsHeld = 0;
|
||||||
|
|
||||||
|
// Score all active holds to NotHeld
|
||||||
|
for( int iTrack=0; iTrack<m_NoteData.GetNumTracks(); ++iTrack )
|
||||||
|
{
|
||||||
|
// Since this is being called every frame, let's not check the whole array every time.
|
||||||
|
// Instead, only check 1 beat back. Even 1 is overkill.
|
||||||
|
const int iStartCheckingAt = max( 0, iSongRow-BeatToNoteRow(1) );
|
||||||
|
NoteData::iterator begin, end;
|
||||||
|
m_NoteData.GetTapNoteRangeInclusive( iTrack, iStartCheckingAt, iSongRow+1, begin, end );
|
||||||
|
for( ; begin != end; ++begin )
|
||||||
|
{
|
||||||
|
TapNote &tn = begin->second;
|
||||||
|
if( tn.HoldResult.bActive )
|
||||||
|
{
|
||||||
|
iMaxHoldCol = iTrack;
|
||||||
|
iNumColsHeld++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Any frets to the right of an active hold will break the hold.
|
||||||
|
if( col > iMaxHoldCol || iNumColsHeld >= 2 )
|
||||||
|
ScoreAllActiveHoldsLetGo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1297,7 +1331,7 @@ void Player::Strum( int col, int row, const RageTimer &tm, bool bHeld, bool bRel
|
|||||||
|
|
||||||
m_pPlayerState->m_fLastStrumMusicSeconds = GAMESTATE->m_fMusicSeconds;
|
m_pPlayerState->m_fLastStrumMusicSeconds = GAMESTATE->m_fMusicSeconds;
|
||||||
|
|
||||||
//StepStrumHopo( col, row, tm, bHeld, bRelease, ButtonType_StrumFretsChanged );
|
StepStrumHopo( col, row, tm, bHeld, bRelease, ButtonType_StrumFretsChanged );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::DoTapScoreNone()
|
void Player::DoTapScoreNone()
|
||||||
@@ -1337,6 +1371,11 @@ void Player::DoStrumMiss()
|
|||||||
m_pPlayerState->m_fLastStrumMusicSeconds = -1;
|
m_pPlayerState->m_fLastStrumMusicSeconds = -1;
|
||||||
DoTapScoreNone();
|
DoTapScoreNone();
|
||||||
|
|
||||||
|
ScoreAllActiveHoldsLetGo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::ScoreAllActiveHoldsLetGo()
|
||||||
|
{
|
||||||
if( PENALIZE_TAP_SCORE_NONE )
|
if( PENALIZE_TAP_SCORE_NONE )
|
||||||
{
|
{
|
||||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||||
@@ -1356,6 +1395,7 @@ void Player::DoStrumMiss()
|
|||||||
if( tn.HoldResult.bActive )
|
if( tn.HoldResult.bActive )
|
||||||
{
|
{
|
||||||
tn.HoldResult.hns = HNS_LetGo;
|
tn.HoldResult.hns = HNS_LetGo;
|
||||||
|
tn.HoldResult.fLife = 0;
|
||||||
|
|
||||||
HandleHoldScore( tn );
|
HandleHoldScore( tn );
|
||||||
SetHoldJudgment( tn.result.tns, tn.HoldResult.hns, iTrack );
|
SetHoldJudgment( tn.result.tns, tn.HoldResult.hns, iTrack );
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public:
|
|||||||
|
|
||||||
// Called when the strum window passes without a row being hit
|
// Called when the strum window passes without a row being hit
|
||||||
void DoStrumMiss();
|
void DoStrumMiss();
|
||||||
|
void ScoreAllActiveHoldsLetGo();
|
||||||
void DoTapScoreNone();
|
void DoTapScoreNone();
|
||||||
|
|
||||||
enum ButtonType { ButtonType_Step, ButtonType_StrumFretsChanged, ButtonType_Hopo };
|
enum ButtonType { ButtonType_Step, ButtonType_StrumFretsChanged, ButtonType_Hopo };
|
||||||
|
|||||||
Reference in New Issue
Block a user