Fixed rare crash with explosions, when m_remaining_time is exactly equal to explosion_time

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6908 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-12-09 01:22:22 +00:00
parent d737425fe5
commit 243c9f37c0
2 changed files with 4 additions and 3 deletions

View File

@ -137,6 +137,7 @@ void Explosion::update(float dt)
{
// Sound and animation finished --> remove node
irr_driver->removeNode(m_node);
m_node = NULL;
projectile_manager->FinishedExplosion();
return;
}

View File

@ -46,7 +46,7 @@ public:
void init (const Vec3& coord);
void update (float delta_t);
int inUse ();
bool hasEnded () { return m_remaining_time < -explosion_time; }
bool hasEnded () { return m_remaining_time <= -explosion_time; }
} ;