Remove unnecessary member. Just set iKeysoundIndex to -1 if it isn't valid.

This commit is contained in:
Steve Checkoway
2006-08-14 10:17:48 +00:00
parent 2f9bda2eea
commit 734f9760cc
7 changed files with 21 additions and 33 deletions
+2 -2
View File
@@ -1267,7 +1267,7 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
if( iIndexOverlappingNote != -1 )
{
const TapNote &tn = m_NoteData.GetTapNote( col, iIndexOverlappingNote );
if( tn.bKeysound && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
m_vKeysounds[tn.iKeysoundIndex].Play();
}
}
@@ -1404,7 +1404,7 @@ void Player::UpdateJudgedRows()
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
continue;
if( tn.bKeysound && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
m_vKeysounds[tn.iKeysoundIndex].Play();
else
m_soundMine.Play();