Bugfix: a crash would happen if a kart that is eliminated
had a plunger flying around. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2894 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
6773718dbd
commit
b21d98e5ea
@ -88,6 +88,15 @@ void RubberBand::removeFromScene()
|
||||
*/
|
||||
void RubberBand::update(float dt)
|
||||
{
|
||||
if(m_owner.isEliminated())
|
||||
{
|
||||
// Rubber band snaps
|
||||
m_plunger->hit(NULL);
|
||||
// This causes the plunger to be removed at the next update
|
||||
m_plunger->setKeepAlive(0.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
Vec3 p;
|
||||
const Vec3 &k = m_owner.getXYZ();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user