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
This commit is contained in:
hikerstk 2010-08-02 23:25:35 +00:00
parent efd148fc42
commit 80dfb0baca

View File

@ -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;