Fixed crash in battle mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6485 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-11-09 21:45:06 +00:00
parent 16b742358c
commit c40e50f4f1

View File

@ -276,7 +276,7 @@ void ThreeStrikesBattle::moveKartAfterRescue(Kart* kart)
{
// no need for the overhead to compute exact distance with sqrt(), so using the
// 'manhattan' heuristic which will do fine enough.
const btTransform &s = world->getTrack()->getStartTransform(n+1);
const btTransform &s = world->getTrack()->getStartTransform(n);
const Vec3 &v=s.getOrigin();
const float dist_n= fabs(kart_x - v.getX()) +
fabs(kart_z - v.getZ());