From 0848fe1349df51c21d952808982e87db7d38dc32 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 11 Mar 2010 22:07:50 +0000 Subject: [PATCH] Fixed distance computation (was still using up instead of forward index). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/switch_coordinate_system@4979 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/graph_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracks/graph_node.cpp b/src/tracks/graph_node.cpp index de63bdf1c..4b6000b48 100644 --- a/src/tracks/graph_node.cpp +++ b/src/tracks/graph_node.cpp @@ -107,7 +107,7 @@ void GraphNode::addSuccessor(unsigned int to) */ void GraphNode::getDistances(const Vec3 &xyz, Vec3 *result) { - core::vector2df xyz2d(xyz.getX(), xyz.getY()); + core::vector2df xyz2d(xyz.getX(), xyz.getZ()); core::vector2df closest = m_line.getClosestPoint(xyz2d); if(m_line.getPointOrientation(xyz2d)>0) result->setX( (closest-xyz2d).getLength()); // to the right