Bugfix: restarting a race would not reset the AI properly, causing them to be rescued over and over.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4441 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
20643c1a44
commit
bc378d4ebd
@ -973,6 +973,8 @@ void DefaultRobot::reset()
|
||||
m_distance_ahead = 0.0f;
|
||||
m_kart_behind = NULL;
|
||||
m_distance_behind = 0.0f;
|
||||
|
||||
AutoKart::reset();
|
||||
m_track_node = QuadGraph::UNKNOWN_SECTOR;
|
||||
m_quad_graph->findRoadSector(getXYZ(), &m_track_node);
|
||||
if(m_track_node==QuadGraph::UNKNOWN_SECTOR)
|
||||
@ -982,7 +984,6 @@ void DefaultRobot::reset()
|
||||
m_track_node = m_quad_graph->findOutOfRoadSector(getXYZ());
|
||||
}
|
||||
|
||||
AutoKart::reset();
|
||||
} // reset
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -1034,6 +1034,7 @@ void NewAI::reset()
|
||||
m_kart_behind = NULL;
|
||||
m_distance_behind = 0.0f;
|
||||
m_track_node = QuadGraph::UNKNOWN_SECTOR;
|
||||
AutoKart::reset();
|
||||
m_quad_graph->findRoadSector(getXYZ(), &m_track_node);
|
||||
if(m_track_node==QuadGraph::UNKNOWN_SECTOR)
|
||||
{
|
||||
@ -1042,7 +1043,6 @@ void NewAI::reset()
|
||||
m_track_node = m_quad_graph->findOutOfRoadSector(getXYZ());
|
||||
}
|
||||
|
||||
AutoKart::reset();
|
||||
} // reset
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user