Fix mines. Now they explode again.
This commit is contained in:
+51
-28
@@ -326,7 +326,8 @@ void Player::Load()
|
|||||||
|
|
||||||
m_iRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1; // why this?
|
m_iRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1; // why this?
|
||||||
m_iMineRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1; // why this?
|
m_iMineRowLastCrossed = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat ) - 1; // why this?
|
||||||
m_iRowLastJudged = m_iRowLastCrossed;
|
m_iRowLastJudged = 0;
|
||||||
|
m_iMineRowLastJudged = 0;
|
||||||
m_JudgedRows.Reset();
|
m_JudgedRows.Reset();
|
||||||
|
|
||||||
// TODO: Remove use of PlayerNumber.
|
// TODO: Remove use of PlayerNumber.
|
||||||
@@ -1376,8 +1377,8 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
|||||||
NSMAN->ReportScore( m_pPlayerState->m_PlayerNumber, TNS_AvoidMine,
|
NSMAN->ReportScore( m_pPlayerState->m_PlayerNumber, TNS_AvoidMine,
|
||||||
m_pPlayerStageStats->iScore,
|
m_pPlayerStageStats->iScore,
|
||||||
m_pPlayerStageStats->iCurCombo );
|
m_pPlayerStageStats->iCurCombo );
|
||||||
// Mines are counted as being judged right away so we must report this now because this
|
/* The only real way to tell if a mine has been scored is if it has disappeared
|
||||||
// row is likely to have been judged already.
|
* but this only works for hit mines so update the scores for avoided mines here. */
|
||||||
if( m_pPrimaryScoreKeeper )
|
if( m_pPrimaryScoreKeeper )
|
||||||
m_pPrimaryScoreKeeper->HandleTapScore( tn );
|
m_pPrimaryScoreKeeper->HandleTapScore( tn );
|
||||||
if( m_pSecondaryScoreKeeper )
|
if( m_pSecondaryScoreKeeper )
|
||||||
@@ -1421,6 +1422,52 @@ void Player::UpdateJudgedRows()
|
|||||||
continue;
|
continue;
|
||||||
OnRowCompletelyJudged( iRow );
|
OnRowCompletelyJudged( iRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( int iRow = m_iMineRowLastJudged+1; iRow <= iEndRow; ++iRow )
|
||||||
|
{
|
||||||
|
for( int iTrack = 0; iTrack < m_NoteData.GetNumTracks(); ++iTrack )
|
||||||
|
{
|
||||||
|
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iRow );
|
||||||
|
|
||||||
|
if( tn.type != TapNote::mine )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
switch( tn.result.tns )
|
||||||
|
{
|
||||||
|
case TNS_None: bAllJudged = false;
|
||||||
|
case TNS_AvoidMine: continue;
|
||||||
|
case TNS_HitMine: break;
|
||||||
|
DEFAULT_FAIL( tn.result.tns );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( tn.result.bHidden )
|
||||||
|
continue;
|
||||||
|
if( m_pNoteField )
|
||||||
|
m_pNoteField->DidTapNote( iTrack, tn.result.tns, false );
|
||||||
|
|
||||||
|
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
|
||||||
|
continue;
|
||||||
|
if( tn.bKeysound && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
|
||||||
|
m_vKeysounds[tn.iKeysoundIndex].Play();
|
||||||
|
else
|
||||||
|
m_soundMine.Play();
|
||||||
|
|
||||||
|
if( m_pLifeMeter )
|
||||||
|
m_pLifeMeter->ChangeLife( tn.result.tns );
|
||||||
|
if( m_pScoreDisplay )
|
||||||
|
m_pScoreDisplay->OnJudgment( tn.result.tns );
|
||||||
|
if( m_pSecondaryScoreDisplay )
|
||||||
|
m_pSecondaryScoreDisplay->OnJudgment( tn.result.tns );
|
||||||
|
if( m_pCombinedLifeMeter )
|
||||||
|
m_pCombinedLifeMeter->ChangeLife( pn, tn.result.tns );
|
||||||
|
|
||||||
|
TapNote tn2 = tn;
|
||||||
|
tn2.result.bHidden = true;
|
||||||
|
m_NoteData.SetTapNote( iTrack, iRow, tn2 );
|
||||||
|
}
|
||||||
|
if( bAllJudged )
|
||||||
|
++m_iMineRowLastJudged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::CrossedRow( int iNoteRow )
|
void Player::CrossedRow( int iNoteRow )
|
||||||
@@ -1564,30 +1611,6 @@ void Player::HandleTapRowScore( unsigned row )
|
|||||||
continue;
|
continue;
|
||||||
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
|
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
|
||||||
continue;
|
continue;
|
||||||
#if 0
|
|
||||||
if( tn.result.tns == TNS_HitMine )
|
|
||||||
{
|
|
||||||
if( tn.bKeysound && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
|
|
||||||
m_vKeysounds[tn.iKeysoundIndex].Play();
|
|
||||||
else
|
|
||||||
m_soundMine.Play();
|
|
||||||
|
|
||||||
if( m_pLifeMeter )
|
|
||||||
m_pLifeMeter->ChangeLife( tn.result.tns );
|
|
||||||
if( m_pScoreDisplay )
|
|
||||||
m_pScoreDisplay->OnJudgment( tn.result.tns );
|
|
||||||
if( m_pSecondaryScoreDisplay )
|
|
||||||
m_pSecondaryScoreDisplay->OnJudgment( tn.result.tns );
|
|
||||||
if( m_pCombinedLifeMeter )
|
|
||||||
m_pCombinedLifeMeter->ChangeLife( pn, tn.result.tns );
|
|
||||||
|
|
||||||
TapNote tn2 = tn;
|
|
||||||
tn2.result.bHidden = true;
|
|
||||||
m_NoteData.SetTapNote( track, row, tn2 );
|
|
||||||
if( m_pNoteField )
|
|
||||||
m_pNoteField->DidTapNote( track, tn.result.tns, false );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if( m_pPrimaryScoreKeeper )
|
if( m_pPrimaryScoreKeeper )
|
||||||
m_pPrimaryScoreKeeper->HandleTapScore( tn );
|
m_pPrimaryScoreKeeper->HandleTapScore( tn );
|
||||||
if( m_pSecondaryScoreKeeper )
|
if( m_pSecondaryScoreKeeper )
|
||||||
@@ -1785,7 +1808,7 @@ void Player::SetJudgment( TapNoteScore tns, bool bEarly )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2006 Chris Danford, Steve Checkoway
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ protected:
|
|||||||
int m_iRowLastCrossed;
|
int m_iRowLastCrossed;
|
||||||
int m_iMineRowLastCrossed;
|
int m_iMineRowLastCrossed;
|
||||||
int m_iRowLastJudged; // Everything up to and including this row has been judged.
|
int m_iRowLastJudged; // Everything up to and including this row has been judged.
|
||||||
|
int m_iMineRowLastJudged;
|
||||||
JudgedRows m_JudgedRows;
|
JudgedRows m_JudgedRows;
|
||||||
|
|
||||||
RageSound m_soundMine;
|
RageSound m_soundMine;
|
||||||
|
|||||||
Reference in New Issue
Block a user