more of the same

This commit is contained in:
Glenn Maynard
2002-09-07 10:43:16 +00:00
parent 6460b7ae88
commit 1f112d3c25
3 changed files with 13 additions and 15 deletions
+10 -11
View File
@@ -68,20 +68,19 @@ void RandomSample::PlayRandom()
if( m_pSamples.GetSize() == 0 )
{
LOG->Trace( "WARNING: Tried to play a RandomSample that has 0 sounds loaded." );
return;
}
else
{
int iIndexToPlay;
for( int i=0; i<5; i++ )
{
iIndexToPlay = rand() % m_pSamples.GetSize();
if( iIndexToPlay != m_iIndexLastPlayed )
break;
}
m_pSamples[iIndexToPlay]->Play();
m_iIndexLastPlayed = iIndexToPlay;
int iIndexToPlay = 0;
for( int i=0; i<5; i++ )
{
iIndexToPlay = rand() % m_pSamples.GetSize();
if( iIndexToPlay != m_iIndexLastPlayed )
break;
}
m_pSamples[iIndexToPlay]->Play();
m_iIndexLastPlayed = iIndexToPlay;
}
void RandomSample::Pause()