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
+3 -3
View File
@@ -91,11 +91,11 @@ void AutoKeysounds::FinishLoading()
bool bSoundIsGlobal = true;
{
PlayerNumber pn = GetNextEnabledPlayer((PlayerNumber)-1);
const TapNote t = tn[pn];
const TapNote &t = tn[pn];
pn = GetNextEnabledPlayer(pn);
while( pn != PLAYER_INVALID )
{
if( tn[pn].type != TapNote::autoKeysound || tn[pn].bKeysound != t.bKeysound )
if( tn[pn].type != TapNote::autoKeysound || tn[pn].iKeysoundIndex != t.iKeysoundIndex )
bSoundIsGlobal = false;
pn = GetNextEnabledPlayer(pn);
}
@@ -107,7 +107,7 @@ void AutoKeysounds::FinishLoading()
continue;
ASSERT( tn[pn].type == TapNote::autoKeysound );
if( tn[pn].bKeysound )
if( tn[pn].iKeysoundIndex >= 0 )
{
RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[tn[pn].iKeysoundIndex];
float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(iRow) );