From 80dfb0baca27768392c9fed74cade5ea23fbbfc8 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 2 Aug 2010 23:25:35 +0000 Subject: [PATCH] Added debug output if a check line is crossed in 2d, but the kart does not have the right height. This helps debugging cases when a check line is too low or too high. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5721 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/check_line.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tracks/check_line.cpp b/src/tracks/check_line.cpp index e997255ff..ff5a03a2f 100644 --- a/src/tracks/check_line.cpp +++ b/src/tracks/check_line.cpp @@ -92,6 +92,12 @@ bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx) // checklines are a bit off in Z direction. result = new_pos.getY()-m_min_height<4.0f && new_pos.getY()-m_min_height>-1.0f; + if(UserConfigParams::m_check_debug && !result) + { + printf("CHECK: Kart %s crosses line, but wrong height (%f vs %f).\n", + World::getWorld()->getKart(indx)->getIdent().c_str(), + new_pos.getY(), m_min_height); + } } else result = false;