Fix invalid graph node sometimes detected
This commit is contained in:
parent
2516de8231
commit
281b30dd5d
@ -75,7 +75,8 @@ RescueAnimation::RescueAnimation(AbstractKart *kart, bool is_auto_rescue)
|
|||||||
// up direction to the right up direction it should have according to
|
// up direction to the right up direction it should have according to
|
||||||
// the last vaild quad of the kart
|
// the last vaild quad of the kart
|
||||||
WorldWithRank* wwr = dynamic_cast<WorldWithRank*>(World::getWorld());
|
WorldWithRank* wwr = dynamic_cast<WorldWithRank*>(World::getWorld());
|
||||||
if (DriveGraph::get() && wwr)
|
if (DriveGraph::get() && wwr &&
|
||||||
|
wwr->getTrackSector(m_kart->getWorldKartId())->getCurrentGraphNode() > -1)
|
||||||
{
|
{
|
||||||
const int sector = wwr->getTrackSector(m_kart->getWorldKartId())
|
const int sector = wwr->getTrackSector(m_kart->getWorldKartId())
|
||||||
->getCurrentGraphNode();
|
->getCurrentGraphNode();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user