From 28f2b3742dbaa0d45bca8b93e15f967aeb572421 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 29 Jun 2010 11:15:00 +0000 Subject: [PATCH] 1) Fixed 'shaking' of kart, which happens esp. in end- and reverse camera (reason was that camera used the previous kart position to adjust the camera settings, while the karts were shown at the new position. This becomes a problem if bullet does more than one time step, since then the usually fixed offset is changes, which is visible). 2) Removed debug output. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5591 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/kart.cpp | 5 +++-- src/karts/moveable.cpp | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index b82c16f33..993f0c861 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -621,6 +621,9 @@ bool Kart::isNearGround() const */ void Kart::update(float dt) { + // Update the position and other data taken from the physics + Moveable::update(dt); + if(!history->replayHistory()) m_controller->update(dt); if(m_camera) @@ -695,8 +698,6 @@ void Kart::update(float dt) updatePhysics(dt); - Moveable::update(dt); - /* (TODO: add back when properly done) for (int n = 0; n < SFXManager::NUM_CUSTOMS; n++) { diff --git a/src/karts/moveable.cpp b/src/karts/moveable.cpp index 3284efdd7..58a84dd3c 100644 --- a/src/karts/moveable.cpp +++ b/src/karts/moveable.cpp @@ -63,10 +63,6 @@ void Moveable::setNode(scene::ISceneNode *n) void Moveable::updateGraphics(const Vec3& offset_xyz, const btQuaternion& rotation) { -#ifdef DEBUG_PRINT - printf("moveable: %f %f (%f %f)\n", getXYZ().getX(), getXYZ().getZ(), - off_xyz.getX(), off_xyz.getZ()); -#endif Vec3 xyz=getXYZ()+offset_xyz; btQuaternion r_all = getRotation()*rotation; Vec3 hpr;