Bugfix: AI considered itself off track incorrectly.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4210 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4369cbf673
commit
0bc8235c35
@ -363,8 +363,8 @@ void DefaultRobot::handleSteering(float dt)
|
||||
*finite state machine.
|
||||
*/
|
||||
//Reaction to being outside of the road
|
||||
if( fabsf(m_world->getDistanceToCenterForKart( getWorldKartId() )) + 0.5f >
|
||||
0.5f* m_quad_graph->getNode(m_track_node).getPathWidth() )
|
||||
if( fabsf(m_world->getDistanceToCenterForKart( getWorldKartId() )) >
|
||||
0.5f* m_quad_graph->getNode(m_track_node).getPathWidth()+0.5f )
|
||||
{
|
||||
steer_angle = steerToPoint(m_quad_graph->getQuad(next).getCenter(),
|
||||
dt );
|
||||
|
Loading…
Reference in New Issue
Block a user