Make sure no kart animation exists during goal reset
This commit is contained in:
parent
4081efbcaa
commit
261932e7b1
@ -706,6 +706,12 @@ void SoccerWorld::resetKartsToSelfGoals()
|
|||||||
if (kart->isEliminated())
|
if (kart->isEliminated())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (kart->getKartAnimation())
|
||||||
|
{
|
||||||
|
AbstractKartAnimation* ka = kart->getKartAnimation();
|
||||||
|
kart->setKartAnimation(NULL);
|
||||||
|
delete ka;
|
||||||
|
}
|
||||||
kart->getBody()->setLinearVelocity(Vec3(0.0f));
|
kart->getBody()->setLinearVelocity(Vec3(0.0f));
|
||||||
kart->getBody()->setAngularVelocity(Vec3(0.0f));
|
kart->getBody()->setAngularVelocity(Vec3(0.0f));
|
||||||
unsigned index = m_kart_position_map.at(kart->getWorldKartId());
|
unsigned index = m_kart_position_map.at(kart->getWorldKartId());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user