fix possibleDP miscalculation when 2 players playing
This commit is contained in:
@@ -213,7 +213,7 @@ int Profile::GetTotalHighScoreDancePointsForStepsType( StepsType st ) const
|
||||
const HighScoreList& hs = h.hs;
|
||||
if( pSteps->m_StepsType == st )
|
||||
{
|
||||
const float* fRadars = pSteps->GetRadarValues();
|
||||
const RadarValues& fRadars = pSteps->GetRadarValues();
|
||||
int iPossibleDP = ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
||||
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
||||
}
|
||||
@@ -237,7 +237,7 @@ int Profile::GetTotalHighScoreDancePointsForStepsType( StepsType st ) const
|
||||
FOREACH_CourseDifficulty( cd )
|
||||
{
|
||||
const HighScoreList& hs = h.hs[st][cd];
|
||||
const float* fRadars = pCourse->GetRadarValues(st,cd);
|
||||
const RadarValues& fRadars = pCourse->GetRadarValues(st,cd);
|
||||
int iPossibleDP = ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
||||
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
||||
}
|
||||
|
||||
@@ -71,11 +71,11 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector<Song*>& apSongs, const vector<Ste
|
||||
NoteDataUtil::TransformNoteData( playerNoteDataPostModifiers, po, GAMESTATE->GetCurrentStyleDef()->m_StepsType, fStartBeat, fEndBeat );
|
||||
}
|
||||
|
||||
float fRadarValuesPostModifiers[NUM_RADAR_CATEGORIES];
|
||||
RadarValues radarValuesPostModifiers;
|
||||
FOREACH_RadarCategory( rc )
|
||||
fRadarValuesPostModifiers[rc] += NoteDataUtil::GetRadarValue( playerNoteDataPostModifiers, rc, pSong->m_fMusicLengthSeconds );
|
||||
radarValuesPostModifiers[rc] += NoteDataUtil::GetRadarValue( playerNoteDataPostModifiers, rc, pSong->m_fMusicLengthSeconds );
|
||||
|
||||
iTotalPossibleDancePoints += this->GetPossibleDancePoints( pSteps->GetRadarValues(), fRadarValuesPostModifiers );
|
||||
iTotalPossibleDancePoints += this->GetPossibleDancePoints( pSteps->GetRadarValues(), radarValuesPostModifiers );
|
||||
}
|
||||
g_CurStageStats.iPossibleDancePoints[pn_] = iTotalPossibleDancePoints;
|
||||
|
||||
@@ -429,7 +429,7 @@ void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tap
|
||||
}
|
||||
|
||||
|
||||
int ScoreKeeperMAX2::GetPossibleDancePoints( const float* fRadars )
|
||||
int ScoreKeeperMAX2::GetPossibleDancePoints( const RadarValues& fRadars )
|
||||
{
|
||||
/* Note that, if Marvelous timing is disabled or not active (not course mode),
|
||||
* PERFECT will be used instead. */
|
||||
@@ -440,7 +440,7 @@ int ScoreKeeperMAX2::GetPossibleDancePoints( const float* fRadars )
|
||||
NumHolds*HoldNoteScoreToDancePoints(HNS_OK);
|
||||
}
|
||||
|
||||
int ScoreKeeperMAX2::GetPossibleDancePoints( const float* fOriginalRadars, const float* fPostRadars )
|
||||
int ScoreKeeperMAX2::GetPossibleDancePoints( const RadarValues& fOriginalRadars, const RadarValues& fPostRadars )
|
||||
{
|
||||
/*
|
||||
* The logic here is that if you use a modifier that adds notes, you should have to
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
|
||||
// This must be calculated using only cached radar values so that we can
|
||||
// do it quickly.
|
||||
static int GetPossibleDancePoints( const float* fRadars );
|
||||
static int GetPossibleDancePoints( const float* fOriginalRadars, const float* fPostRadars );
|
||||
static int GetPossibleDancePoints( const RadarValues& fRadars );
|
||||
static int GetPossibleDancePoints( const RadarValues& fOriginalRadars, const RadarValues& fPostRadars );
|
||||
|
||||
private:
|
||||
static int TapNoteScoreToDancePoints( TapNoteScore tns );
|
||||
|
||||
Reference in New Issue
Block a user