add fix and check

This commit is contained in:
Glenn Maynard
2002-12-18 08:26:56 +00:00
parent 49dbf37962
commit 6702f3cde7
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -39,18 +39,22 @@ public:
const TapNoteScore &GetTapNoteScore(int track, int row) const const TapNoteScore &GetTapNoteScore(int track, int row) const
{ {
ASSERT(row < int(m_TapNoteScores[track].size()));
return m_TapNoteScores[track][row]; return m_TapNoteScores[track][row];
} }
TapNoteScore &GetTapNoteScore(int track, int row) TapNoteScore &GetTapNoteScore(int track, int row)
{ {
ASSERT(row < int(m_TapNoteScores[track].size()));
return m_TapNoteScores[track][row]; return m_TapNoteScores[track][row];
} }
const HoldNoteScore &GetHoldNoteScore(int h) const const HoldNoteScore &GetHoldNoteScore(int h) const
{ {
ASSERT(h < int(m_HoldNoteScores.size()));
return m_HoldNoteScores[h]; return m_HoldNoteScores[h];
} }
HoldNoteScore &GetHoldNoteScore(int h) HoldNoteScore &GetHoldNoteScore(int h)
{ {
ASSERT(h < int(m_HoldNoteScores.size()));
return m_HoldNoteScores[h]; return m_HoldNoteScores[h];
} }
float &GetHoldNoteLife(int h) float &GetHoldNoteLife(int h)
+1 -1
View File
@@ -125,7 +125,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
// init scoring // init scoring
NoteDataWithScoring::Init(pNoteData->GetLastRow(), pNoteData->GetNumHoldNotes()); NoteDataWithScoring::Init(pNoteData->GetLastRow()+1, pNoteData->GetNumHoldNotes());
// copy note data // copy note data
this->CopyAll( pNoteData ); this->CopyAll( pNoteData );