Fix #664
After DemoWorld finishes/gets aborted, the static variable in ProfileWorld would still be set to profiling, indicating that profiling still had to be done. This caused troubles with trying to race after the demo had run at least once. Any started race would be seen as profiling. Simply deactivating profiling when ProfileWorld gets destroyed does the trick. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11392 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
cba46818f8
commit
22d2b58112
@ -55,6 +55,16 @@ ProfileWorld::ProfileWorld()
|
||||
m_num_calls = 0;
|
||||
} // ProfileWorld
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Sets profile mode off again.
|
||||
* Needed because demo mode's closing allows the player to continue playing
|
||||
* STK. If we didn't set it off, profile mode would stay activated.
|
||||
*/
|
||||
ProfileWorld::~ProfileWorld()
|
||||
{
|
||||
m_profile_mode = PROFILE_NONE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Enables profiling for a certain amount of time. It also sets the
|
||||
* number of laps to a high number (so that the lap count will not finish
|
||||
|
@ -78,7 +78,7 @@ protected:
|
||||
|
||||
public:
|
||||
ProfileWorld();
|
||||
virtual ~ProfileWorld() {};
|
||||
virtual ~ProfileWorld();
|
||||
/** Returns identifier for this world. */
|
||||
virtual std::string getInternalCode() const {return "PROFILE"; }
|
||||
virtual void update(float dt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user