From 20b4282ad1ebfbb00a84c881b1a79709a7047ea8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 17 Aug 2005 22:13:03 +0000 Subject: [PATCH] don't play transition sounds when attract sounds are off --- stepmania/src/Transition.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Transition.cpp b/stepmania/src/Transition.cpp index 86761aeaac..93ef05b5e6 100644 --- a/stepmania/src/Transition.cpp +++ b/stepmania/src/Transition.cpp @@ -4,6 +4,8 @@ #include "ScreenManager.h" #include "IniFile.h" #include "RageFile.h" +#include "Screen.h" +#include "GameState.h" /* @@ -73,7 +75,11 @@ void Transition::UpdateInternal( float fDeltaTime ) /* Start the transition on the first update, not in the ctor, so * we don't play a sound while our parent is still loading. */ if( m_bFirstUpdate ) - m_sound.PlayCopyOfRandom(); + { + bool bIsAttract = SCREENMAN->GetTopScreen()->GetScreenType() == attract; + if( !bIsAttract || GAMESTATE->IsTimeToPlayAttractSounds() ) + m_sound.PlayCopyOfRandom(); + } // Check this before running Update, so we draw the last frame of the finished // transition before sending m_MessageToSendWhenDone.