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:
parent
16b742358c
commit
c40e50f4f1
@ -276,7 +276,7 @@ void ThreeStrikesBattle::moveKartAfterRescue(Kart* kart)
|
|||||||
{
|
{
|
||||||
// no need for the overhead to compute exact distance with sqrt(), so using the
|
// no need for the overhead to compute exact distance with sqrt(), so using the
|
||||||
// 'manhattan' heuristic which will do fine enough.
|
// '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 Vec3 &v=s.getOrigin();
|
||||||
const float dist_n= fabs(kart_x - v.getX()) +
|
const float dist_n= fabs(kart_x - v.getX()) +
|
||||||
fabs(kart_z - v.getZ());
|
fabs(kart_z - v.getZ());
|
||||||
|
Loading…
Reference in New Issue
Block a user