fix successful jumps miscalculation: Player used "latest tap note score". Scoring used "min tap note score".
This commit is contained in:
@@ -136,6 +136,7 @@ enum TapNoteScore {
|
|||||||
TNS_PERFECT,
|
TNS_PERFECT,
|
||||||
TNS_MARVELOUS,
|
TNS_MARVELOUS,
|
||||||
NUM_TAP_NOTE_SCORES,
|
NUM_TAP_NOTE_SCORES,
|
||||||
|
TNS_INVALID,
|
||||||
};
|
};
|
||||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
||||||
const CString& TapNoteScoreToString( TapNoteScore tns );
|
const CString& TapNoteScoreToString( TapNoteScore tns );
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "NoteData.h"
|
#include "NoteData.h"
|
||||||
#include "StageStats.h"
|
#include "StageStats.h"
|
||||||
#include "StatsManager.h"
|
#include "StatsManager.h"
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -23,25 +24,15 @@ int GetNumTapNotesWithScore( const NoteData &in, TapNoteScore tns, int iStartInd
|
|||||||
return iNumSuccessfulTapNotes;
|
return iNumSuccessfulTapNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW )
|
int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iStartRow = 0, int iEndRow = MAX_NOTE_ROW )
|
||||||
{
|
{
|
||||||
int iNumSuccessfulDoubles = 0;
|
int iNumSuccessfulDoubles = 0;
|
||||||
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, i, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow )
|
||||||
{
|
{
|
||||||
int iNumNotesThisIndex = 0;
|
int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r );
|
||||||
TapNoteScore minTapNoteScore = TNS_MARVELOUS;
|
TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteScore( in, r );
|
||||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
|
||||||
{
|
if( iNumNotesInRow >= MinTaps && tnsRow >= tns )
|
||||||
const TapNote &tn = in.GetTapNote(t,i);
|
|
||||||
switch( tn.type )
|
|
||||||
{
|
|
||||||
case TapNote::tap:
|
|
||||||
case TapNote::hold_head:
|
|
||||||
iNumNotesThisIndex++;
|
|
||||||
minTapNoteScore = min( minTapNoteScore, tn.result.tns );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( iNumNotesThisIndex >= MinTaps && minTapNoteScore >= tns )
|
|
||||||
iNumSuccessfulDoubles++;
|
iNumSuccessfulDoubles++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user