Fix potential crashes
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11458 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
fd6f2aa617
commit
678a45cc9a
@ -201,7 +201,7 @@ void AIBaseController::crashed(const Material *m)
|
||||
const unsigned int NUM_COLLISION = 3;
|
||||
const float COLLISION_TIME = 1.5f;
|
||||
|
||||
float time = m_world->getTime();
|
||||
float time = World::getWorld()->getTime();
|
||||
if(m_collision_times.size()==0)
|
||||
{
|
||||
m_collision_times.push_back(time);
|
||||
|
@ -273,6 +273,7 @@ TrackObject::TrackObject(const core::vector3df& pos, const core::vector3df& hpr,
|
||||
m_enabled = true;
|
||||
m_is_looped = false;
|
||||
m_sound = NULL;
|
||||
m_emitter = NULL;
|
||||
|
||||
// Some animated objects (billboards, sound emitters) don't use this scene node
|
||||
if (model_name == "")
|
||||
@ -343,6 +344,7 @@ TrackObject::TrackObject()
|
||||
m_node = NULL;
|
||||
m_mesh = NULL;
|
||||
m_sound = NULL;
|
||||
m_emitter = NULL;
|
||||
} // TrackObject()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user