Fixed #1089.
Stop goal sound when the game is terminated or restarted. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14405 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -44,8 +44,16 @@ SoccerWorld::SoccerWorld() : WorldWithRank()
|
||||
WorldStatus::setClockMode(CLOCK_CHRONO);
|
||||
m_use_highscores = false;
|
||||
} // SoccerWorld
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** The destructor frees al data structures.
|
||||
*/
|
||||
SoccerWorld::~SoccerWorld()
|
||||
{
|
||||
sfx_manager->deleteSFX(m_goal_sound);
|
||||
} // ~SoccerWorld
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** Initializes the soccer world. It sets up the data structure
|
||||
* to keep track of points etc. for each kart.
|
||||
*/
|
||||
@@ -95,6 +103,12 @@ void SoccerWorld::reset()
|
||||
obj->reset();
|
||||
obj->getPhysics()->reset();
|
||||
}
|
||||
|
||||
if (m_goal_sound != NULL &&
|
||||
m_goal_sound->getStatus() == SFXManager::SFX_PLAYING)
|
||||
{
|
||||
m_goal_sound->stop();
|
||||
}
|
||||
|
||||
initKartList();
|
||||
} // reset
|
||||
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
public:
|
||||
|
||||
SoccerWorld();
|
||||
virtual ~SoccerWorld() {}
|
||||
virtual ~SoccerWorld();
|
||||
|
||||
virtual void init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user