Pass in a PlayerNumber as well.
(This breaks other code, commits coming.)
This commit is contained in:
@@ -28,7 +28,7 @@ int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iSt
|
|||||||
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow )
|
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow )
|
||||||
{
|
{
|
||||||
int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r );
|
int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r );
|
||||||
TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteWithResult( in, r ).result.tns;
|
TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteWithResult( in, r, PLAYER_INVALID ).result.tns;
|
||||||
|
|
||||||
if( iNumNotesInRow >= MinTaps && tnsRow >= tns )
|
if( iNumNotesInRow >= MinTaps && tnsRow >= tns )
|
||||||
iNumSuccessfulDoubles++;
|
iNumSuccessfulDoubles++;
|
||||||
@@ -170,24 +170,26 @@ const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, u
|
|||||||
|
|
||||||
/* Return the minimum tap score of a row. If the row isn't complete (not all
|
/* Return the minimum tap score of a row. If the row isn't complete (not all
|
||||||
* taps have been hit), return TNS_None or TNS_Miss. */
|
* taps have been hit), return TNS_None or TNS_Miss. */
|
||||||
TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned row )
|
TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned row, PlayerNumber pn )
|
||||||
{
|
{
|
||||||
TapNoteScore score = TNS_W1;
|
TapNoteScore score = TNS_W1;
|
||||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
for( int t=0; t<in.GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
/* Ignore mines, or the score will always be TNS_None. */
|
/* Ignore mines, or the score will always be TNS_None. */
|
||||||
const TapNote &tn = in.GetTapNote(t, row);
|
const TapNote &tn = in.GetTapNote( t, row );
|
||||||
if( tn.type == TapNote::empty || tn.type == TapNote::mine )
|
if( tn.type == TapNote::empty || tn.type == TapNote::mine )
|
||||||
continue;
|
continue;
|
||||||
|
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
|
||||||
|
continue;
|
||||||
score = min( score, tn.result.tns );
|
score = min( score, tn.result.tns );
|
||||||
}
|
}
|
||||||
|
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NoteDataWithScoring::IsRowCompletelyJudged( const NoteData &in, unsigned row )
|
bool NoteDataWithScoring::IsRowCompletelyJudged( const NoteData &in, unsigned row, PlayerNumber pn )
|
||||||
{
|
{
|
||||||
return MinTapNoteScore( in, row ) >= TNS_Miss;
|
return MinTapNoteScore( in, row, pn ) >= TNS_Miss;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ class NoteData;
|
|||||||
class PlayerStageStats;
|
class PlayerStageStats;
|
||||||
namespace NoteDataWithScoring
|
namespace NoteDataWithScoring
|
||||||
{
|
{
|
||||||
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow );
|
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow, PlayerNumber pn );
|
||||||
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow );
|
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow, PlayerNumber pn );
|
||||||
const TapNote &LastTapNoteWithResult( const NoteData &in, unsigned iRow, PlayerNumber pn = PLAYER_INVALID );
|
const TapNote &LastTapNoteWithResult( const NoteData &in, unsigned iRow, PlayerNumber pn );
|
||||||
|
|
||||||
void GetActualRadarValues( const NoteData &in, const PlayerStageStats &pss, float fSongSeconds, RadarValues& out );
|
void GetActualRadarValues( const NoteData &in, const PlayerStageStats &pss, float fSongSeconds, RadarValues& out );
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user