From ada5a204458f8797363605b32ff0cd5e436209ba Mon Sep 17 00:00:00 2001 From: hiker Date: Tue, 17 Feb 2015 17:14:53 +1100 Subject: [PATCH] Added some (commented out) debug lines that are useful when comparing different kart physics. --- src/karts/kart.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index f7c567b70..a730252d1 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1093,6 +1093,19 @@ void Kart::eliminate() */ void Kart::update(float dt) { +#ifdef DEBUG_TO_COMPARE_KART_PHYSICS + // This information is useful when comparing kart physics, e.g. to + // see top speed, acceleration (i.e. time to top speed) etc. + Log::verbose("physics", "%s t %f xyz %f %f %f %f v %f %f %f %f maxv %f", + getIdent().c_str(), + World::getWorld()->getTime(), + getXYZ().getX(), getXYZ().getY(), getXYZ().getZ(), + getXYZ().length(), + getVelocity().getX(), getVelocity().getY(), getVelocity().getZ(), + getVelocity().length(), + m_max_speed->getCurrentMaxSpeed()); +#endif + if ( UserConfigParams::m_graphical_effects ) { // update star effect (call will do nothing if stars are not activated)