Fixed incorrect axis.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/switch_coordinate_system@4980 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-03-11 22:08:16 +00:00
parent 0848fe1349
commit c849e91221

View File

@ -381,7 +381,7 @@ void QuadGraph::findRoadSector(const Vec3& xyz, int *sector,
else
indx = indx<(int)m_all_nodes.size()-1 ? indx +1 : 0;
const Quad &q = getQuad(indx);
float dist = xyz.getZ() - q.getMinHeight();
float dist = xyz.getY() - q.getMinHeight();
// While negative distances are unlikely, we allow some small netative
// numbers in case that the kart is partly in the track.
if(q.pointInQuad(xyz) && dist < min_dist && dist>-1.0f)