add TNS_AVOIDED_MINE. Fixes unattempted mines counted as successful when ending early.
This commit is contained in:
@@ -126,6 +126,7 @@ StringToX( SortOrder );
|
||||
static const CString TapNoteScoreNames[NUM_TAP_NOTE_SCORES] = {
|
||||
"None",
|
||||
"HitMine",
|
||||
"AvoidMine",
|
||||
"Miss",
|
||||
"Boo",
|
||||
"Good",
|
||||
|
||||
@@ -128,13 +128,14 @@ inline bool IsSongSort( SortOrder so ) { return so >= SORT_PREFERRED && so <= SO
|
||||
enum TapNoteScore {
|
||||
TNS_NONE,
|
||||
TNS_HIT_MINE,
|
||||
TNS_AVOIDED_MINE,
|
||||
TNS_MISS,
|
||||
TNS_BOO,
|
||||
TNS_GOOD,
|
||||
TNS_GREAT,
|
||||
TNS_PERFECT,
|
||||
TNS_MARVELOUS,
|
||||
NUM_TAP_NOTE_SCORES
|
||||
NUM_TAP_NOTE_SCORES,
|
||||
};
|
||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
||||
const CString& TapNoteScoreToString( TapNoteScore tns );
|
||||
|
||||
@@ -77,7 +77,7 @@ int GetSuccessfulMines( const NoteData &in, int iStartIndex = 0, int iEndIndex =
|
||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = in.GetTapNote(t,i);
|
||||
if( tn.type == TapNote::mine && tn.result.tns != TNS_HIT_MINE )
|
||||
if( tn.type == TapNote::mine && tn.result.tns == TNS_AVOIDED_MINE )
|
||||
iNumSuccessfulMinesNotes++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,6 +1063,7 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
||||
TapNoteScore score = NoteDataWithScoring::LastTapNoteScore( m_NoteData, iIndexThatWasSteppedOn );
|
||||
ASSERT(score != TNS_NONE);
|
||||
ASSERT(score != TNS_HIT_MINE);
|
||||
ASSERT(score != TNS_AVOIDED_MINE);
|
||||
|
||||
/* If the whole row was hit with perfects or greats, remove the row
|
||||
* from the NoteField, so it disappears. */
|
||||
@@ -1143,21 +1144,25 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
||||
{
|
||||
case TapNote::empty:
|
||||
case TapNote::attack:
|
||||
case TapNote::mine:
|
||||
continue; /* no note here */
|
||||
}
|
||||
if( tn.result.tns != TNS_NONE ) /* note here is already hit */
|
||||
continue;
|
||||
|
||||
tn.result.tns = TNS_MISS;
|
||||
|
||||
// A normal note. Penalize for not stepping on it.
|
||||
MissedNoteOnThisRow = true;
|
||||
if( tn.type == TapNote::mine )
|
||||
{
|
||||
tn.result.tns = TNS_AVOIDED_MINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// A normal note. Penalize for not stepping on it.
|
||||
MissedNoteOnThisRow = true;
|
||||
tn.result.tns = TNS_MISS;
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->iTotalError += MAX_PRO_TIMING_ERROR;
|
||||
}
|
||||
|
||||
m_NoteData.SetTapNote( t, r, tn );
|
||||
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->iTotalError += MAX_PRO_TIMING_ERROR;
|
||||
}
|
||||
|
||||
if( MissedNoteOnThisRow )
|
||||
|
||||
@@ -129,15 +129,16 @@ Grade PlayerStageStats::GetGrade() const
|
||||
int iTapScoreValue;
|
||||
switch( tns )
|
||||
{
|
||||
case TNS_NONE: iTapScoreValue = 0; break;
|
||||
case TNS_HIT_MINE: iTapScoreValue = PREFSMAN->m_iGradeWeightHitMine; break;
|
||||
case TNS_MISS: iTapScoreValue = PREFSMAN->m_iGradeWeightMiss; break;
|
||||
case TNS_BOO: iTapScoreValue = PREFSMAN->m_iGradeWeightBoo; break;
|
||||
case TNS_GOOD: iTapScoreValue = PREFSMAN->m_iGradeWeightGood; break;
|
||||
case TNS_GREAT: iTapScoreValue = PREFSMAN->m_iGradeWeightGreat; break;
|
||||
case TNS_PERFECT: iTapScoreValue = PREFSMAN->m_iGradeWeightPerfect; break;
|
||||
case TNS_MARVELOUS: iTapScoreValue = PREFSMAN->m_iGradeWeightMarvelous; break;
|
||||
default: FAIL_M( ssprintf("%i", tns) ); break;
|
||||
case TNS_NONE: iTapScoreValue = 0; break;
|
||||
case TNS_AVOIDED_MINE: iTapScoreValue = 0; break;
|
||||
case TNS_HIT_MINE: iTapScoreValue = PREFSMAN->m_iGradeWeightHitMine; break;
|
||||
case TNS_MISS: iTapScoreValue = PREFSMAN->m_iGradeWeightMiss; break;
|
||||
case TNS_BOO: iTapScoreValue = PREFSMAN->m_iGradeWeightBoo; break;
|
||||
case TNS_GOOD: iTapScoreValue = PREFSMAN->m_iGradeWeightGood; break;
|
||||
case TNS_GREAT: iTapScoreValue = PREFSMAN->m_iGradeWeightGreat; break;
|
||||
case TNS_PERFECT: iTapScoreValue = PREFSMAN->m_iGradeWeightPerfect; break;
|
||||
case TNS_MARVELOUS: iTapScoreValue = PREFSMAN->m_iGradeWeightMarvelous; break;
|
||||
default: FAIL_M( ssprintf("%i", tns) ); break;
|
||||
}
|
||||
Actual += iTapNoteScores[tns] * iTapScoreValue;
|
||||
if( tns != TNS_HIT_MINE )
|
||||
|
||||
@@ -1435,19 +1435,27 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
{
|
||||
TapNoteScore tns = m_Player[p].GetLastTapNoteScore();
|
||||
|
||||
ANIM_STATES_2D StateMap[NUM_TAP_NOTE_SCORES] =
|
||||
{
|
||||
AS2D_MISS, /* TNS_NONE (shouldn't happen) */
|
||||
AS2D_MISS, /* TNS_HIT_MINE (shouldn't happen) */
|
||||
AS2D_MISS, /* TNS_MISS */
|
||||
AS2D_MISS, /* TNS_BOO */
|
||||
AS2D_GOOD, /* TNS_GOOD */
|
||||
AS2D_GOOD, /* TNS_GREAT */
|
||||
AS2D_GREAT, /* TNS_PERFECT */
|
||||
AS2D_GREAT /* TNS_MARVELOUS */
|
||||
};
|
||||
ANIM_STATES_2D state = AS2D_MISS;
|
||||
|
||||
switch( tns )
|
||||
{
|
||||
case TNS_NONE:
|
||||
case TNS_MISS:
|
||||
case TNS_BOO:
|
||||
state = AS2D_MISS;
|
||||
break;
|
||||
case TNS_GOOD:
|
||||
case TNS_GREAT:
|
||||
state = AS2D_GOOD;
|
||||
break;
|
||||
case TNS_PERFECT:
|
||||
case TNS_MARVELOUS:
|
||||
state = AS2D_GREAT;
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
ANIM_STATES_2D state = StateMap[tns];
|
||||
if( state == AS2D_GREAT && m_pLifeMeter[p] && m_pLifeMeter[p]->GetLife() == 1.0f ) // full life
|
||||
state = AS2D_FEVER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user