Move updateTerrainInfo to a better location

This commit is contained in:
Benau
2016-09-10 11:09:52 +08:00
parent ceb92f9b4a
commit fde9ccd53e
2 changed files with 4 additions and 3 deletions

View File

@@ -98,9 +98,6 @@ RescueAnimation::~RescueAnimation()
camera->setMode(Camera::CM_NORMAL);
}
}
// Update the terrain info based on the moved position now, as
// updatePhysics in kart requires the normal from moved position to work
m_kart->updateTerrainInfo();
} // ~RescueAnimation
// ----------------------------------------------------------------------------

View File

@@ -811,6 +811,10 @@ void World::moveKartTo(AbstractKart* kart, const btTransform &transform)
// This will set the physics transform
m_track->findGround(kart);
// Update the terrain info based on the moved position now, as
// updatePhysics in kart requires the normal from moved position to work
kart->updateTerrainInfo();
} // moveKartTo
// ----------------------------------------------------------------------------