From eef888d2b7bd0ef4e40b7973bf949f0e59af4572 Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 7 Aug 2018 02:36:38 +0800 Subject: [PATCH] Fix falling effect of rescue animation in network --- src/karts/rescue_animation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/karts/rescue_animation.cpp b/src/karts/rescue_animation.cpp index b270115a3..432c0529f 100644 --- a/src/karts/rescue_animation.cpp +++ b/src/karts/rescue_animation.cpp @@ -51,6 +51,7 @@ RescueAnimation::RescueAnimation(AbstractKart *kart, bool is_auto_rescue) World::getWorld()->moveKartAfterRescue(kart); m_end_transform = kart->getTrans(); + kart->getBody()->setCenterOfMassTransform(prev_trans); kart->setTrans(prev_trans); m_referee = new Referee(*m_kart); @@ -149,6 +150,7 @@ void RescueAnimation::update(float dt) if (m_kart_on_track == false) { m_kart_on_track = true; + m_kart->getBody()->setCenterOfMassTransform(m_end_transform); m_kart->setTrans(m_end_transform); for (unsigned int i = 0; i < Camera::getNumCameras(); i++) {