Fixed my score code. Sorry about that.
This commit is contained in:
@@ -96,7 +96,6 @@ void GameState::Reset()
|
||||
for( s=0; s<NUM_HOLD_NOTE_SCORES; s++ )
|
||||
m_HoldNoteScores[p][s] = 0;
|
||||
m_iMaxCombo[p] = 0;
|
||||
m_lScore[p] = 0;
|
||||
m_fScore[p] = 0;
|
||||
|
||||
for( int r=0; r<NUM_RADAR_VALUES; r++ )
|
||||
|
||||
@@ -101,8 +101,6 @@ public:
|
||||
int m_HoldNoteScores[NUM_PLAYERS][NUM_HOLD_NOTE_SCORES];
|
||||
int m_iMaxCombo[NUM_PLAYERS];
|
||||
float m_fScore[NUM_PLAYERS];
|
||||
long m_lScore[NUM_PLAYERS];
|
||||
float m_fScoreMultiplier;
|
||||
float m_fRadarPossible[NUM_PLAYERS][NUM_RADAR_VALUES]; // filled in by ScreenGameplay on end of notes
|
||||
float m_fRadarActual[NUM_PLAYERS][NUM_RADAR_VALUES]; // filled in by ScreenGameplay on end of notes
|
||||
|
||||
|
||||
@@ -124,8 +124,10 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
||||
|
||||
m_iNumTapNotes = pNoteData->GetNumTapNotes();
|
||||
m_iTapNotesHit = 0;
|
||||
m_lScore = 0;
|
||||
m_iMeter = GAMESTATE->m_pCurNotes[m_PlayerNumber] ? GAMESTATE->m_pCurNotes[m_PlayerNumber]->m_iMeter : 5;
|
||||
|
||||
m_fScoreMultiplier = (double)(m_iMeter * 1000000) / (double)((m_iNumTapNotes * (m_iNumTapNotes + 1)) >> 1);
|
||||
ASSERT(m_fScoreMultiplier >= 0.0);
|
||||
|
||||
|
||||
if( m_pScore )
|
||||
@@ -624,7 +626,6 @@ void Player::HandleNoteScore( TapNoteScore score, int iNumTapsInRow )
|
||||
// lScore == p * n
|
||||
// m_fScoreMultiplier = (B/S)
|
||||
// keeping these seperate for as long as possible improves accuracy.
|
||||
long &lScore = GAMESTATE->m_lScore[m_PlayerNumber];
|
||||
int p; // score multiplier
|
||||
|
||||
switch( score )
|
||||
@@ -635,11 +636,12 @@ void Player::HandleNoteScore( TapNoteScore score, int iNumTapsInRow )
|
||||
}
|
||||
|
||||
for( int i=0; i<iNumTapsInRow; i++ )
|
||||
lScore += p * ++m_iTapNotesHit;
|
||||
ASSERT(lScore > 0);
|
||||
GAMESTATE->m_fScoreMultiplier = 0; // XXX this isn't being set anywhere
|
||||
m_lScore += p * ++m_iTapNotesHit;
|
||||
|
||||
ASSERT(m_lScore >= 0);
|
||||
|
||||
if (m_pScore)
|
||||
m_pScore->SetScore(GAMESTATE->m_fScore[m_PlayerNumber] = lScore * GAMESTATE->m_fScoreMultiplier);
|
||||
m_pScore->SetScore(GAMESTATE->m_fScore[m_PlayerNumber] = m_lScore * m_fScoreMultiplier);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ protected:
|
||||
int m_iNumTapNotes; // num of TapNotes for the current notes needed by scoring
|
||||
int m_iTapNotesHit; // number of notes judged so far, needed by scoring
|
||||
int m_iMeter; // meter of current steps, needed by scoring
|
||||
long m_lScore;
|
||||
float m_fScoreMultiplier;
|
||||
|
||||
float m_fOffset[SAMPLE_COUNT];//for AutoAdjust
|
||||
int m_iOffsetSample; //
|
||||
|
||||
Reference in New Issue
Block a user