Fixed bug 2972321 - crash in battle mode since in battle mode there is no quad graph.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5051 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a2c524a4eb
commit
bd89c51fca
@ -773,8 +773,9 @@ void Kart::update(float dt)
|
||||
if (getHoT()==Track::NOHIT) // kart falling off the track
|
||||
{
|
||||
// let kart fall a bit before rescuing
|
||||
if(fabs( getXYZ().getZ()
|
||||
-World::getWorld()->getTrack()->getQuadGraph().getQuad(0).getCenter().getZ() ) > 17)
|
||||
const Vec3 *min, *max;
|
||||
World::getWorld()->getTrack()->getAABB(&min, &max);
|
||||
if(min->getY() - getXYZ().getY() > 17)
|
||||
forceRescue();
|
||||
}
|
||||
else if(material)
|
||||
|
Loading…
x
Reference in New Issue
Block a user