diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 53831fed72..a459dc1a39 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -85,6 +85,7 @@ static const int NUM_SHOWN_RADAR_CATEGORIES = 5; AutoScreenMessage( SM_PlayCheer ) AutoScreenMessage( SM_AddBonus ) +AutoScreenMessage( SM_PlayPassSound ) REGISTER_SCREEN_CLASS( ScreenEvaluation ); @@ -282,12 +283,12 @@ void ScreenEvaluation::Init() m_SoundSequences.push_back(temp); } - m_bPassFailTriggered = false; // the sound hasn't been triggered yet if( m_bFailed ) m_sndPassFail.Load( THEME->GetPathS(m_sName, "failed") ); else m_sndPassFail.Load( THEME->GetPathS(m_sName, "passed") ); - m_sndPassFail.Play(); + this->PostScreenMessage( SM_PlayPassSound, 0 ); + this->PostScreenMessage( SM_PlayPassSound, m_bFailed? FAILED_SOUND_TIME:PASSED_SOUND_TIME ); // // load other sounds @@ -1254,17 +1255,6 @@ void ScreenEvaluation::Update( float fDeltaTime ) { ScreenWithMenuElements::Update( fDeltaTime ); - if( !m_bPassFailTriggered ) - { - float fTime = m_bFailed? FAILED_SOUND_TIME:PASSED_SOUND_TIME; - if( m_timerSoundSequences.Ago() > fTime ) - { - if( !m_sndPassFail.IsPlaying() ) - m_sndPassFail.Play(); - m_bPassFailTriggered = true; - } - } - for( unsigned snd=0; sndIsEventMode() ) diff --git a/stepmania/src/ScreenEvaluation.h b/stepmania/src/ScreenEvaluation.h index 19a230bb71..280d960b61 100644 --- a/stepmania/src/ScreenEvaluation.h +++ b/stepmania/src/ScreenEvaluation.h @@ -132,7 +132,6 @@ protected: // sound effects for other gametypes RageSound m_sndPassFail; // sound played if the player passes or fails - bool m_bPassFailTriggered; // has the pass / fail sound been played yet? RageTimer m_timerSoundSequences; // timer used for triggering sounds. vector m_SoundSequences; // a sequence of sounds to be played (although they're stored in no particular order!)