Stop sounds on close Grand Prix win screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14456 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c3c2de2ce7
commit
a6952261e2
@ -217,7 +217,7 @@ void GrandPrixWin::init()
|
||||
m_light->getLightData().AmbientColor = irr::video::SColorf(0.25f, 0.25f, 0.25f, 1.0f);
|
||||
m_light->getLightData().SpecularColor = irr::video::SColorf(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
sfx_manager->quickSound("gp_end");
|
||||
m_finish_sound = sfx_manager->quickSound("gp_end");
|
||||
} // init
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
@ -254,6 +254,12 @@ void GrandPrixWin::tearDown()
|
||||
delete m_unlocked_label;
|
||||
m_unlocked_label = NULL;
|
||||
}
|
||||
|
||||
if (m_finish_sound != NULL &&
|
||||
m_finish_sound->getStatus() == SFXManager::SFX_PLAYING)
|
||||
{
|
||||
m_finish_sound->stop();
|
||||
}
|
||||
} // tearDown
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
@ -19,6 +19,7 @@
|
||||
#ifndef HEADER_GRAND_PRIX_WIN_HPP
|
||||
#define HEADER_GRAND_PRIX_WIN_HPP
|
||||
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "guiengine/screen.hpp"
|
||||
#include "karts/kart_model.hpp"
|
||||
|
||||
@ -67,6 +68,7 @@ class GrandPrixWin : public GUIEngine::Screen, public GUIEngine::ScreenSingleton
|
||||
float m_camera_target_x, m_camera_target_z;
|
||||
|
||||
MusicInformation* m_music;
|
||||
SFXBase* m_finish_sound;
|
||||
|
||||
public:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user