Fix restarting race not resetting kart velocity during a cannon ride. Fixes #2738

This commit is contained in:
auria.mg 2017-01-15 19:22:06 -05:00
parent 20ed2ad277
commit 02d3e7a371

View File

@ -78,12 +78,15 @@ AbstractKart::~AbstractKart()
// ----------------------------------------------------------------------------
void AbstractKart::reset()
{
Moveable::reset();
// important to delete animations before calling reset, as some animations
// set the kart velocity in their destructor (e.g. cannon) which "reset"
// can then cancel. See #2738
if(m_kart_animation)
{
delete m_kart_animation;
m_kart_animation = NULL;
}
Moveable::reset();
} // reset
// ----------------------------------------------------------------------------