From 8e9d518aa226a2c5a2559a3fab10e3991b64a4f0 Mon Sep 17 00:00:00 2001 From: nixt Date: Fri, 7 Mar 2014 07:41:55 +0530 Subject: [PATCH] Increase curve radius to reduce braking when kart is close. --- src/karts/controller/battle_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/karts/controller/battle_ai.cpp b/src/karts/controller/battle_ai.cpp index 229400841..4fe296f7c 100644 --- a/src/karts/controller/battle_ai.cpp +++ b/src/karts/controller/battle_ai.cpp @@ -179,7 +179,7 @@ void BattleAI::handleSteering(const float dt) m_target_node = player_node; m_target_point = kart->getXYZ(); - handleItemCollection(&m_target_point, &m_target_node); + //handleItemCollection(&m_target_point, &m_target_node); m_debug_sphere->setPosition(m_target_point.toIrrVector()); if(m_target_node == m_current_node) { @@ -433,7 +433,7 @@ void BattleAI::handleBraking() Vec3 d1 = m_kart->getXYZ() - m_target_point; Vec3 d2 = m_kart->getXYZ() - m_path_corners[0]; if (d1.length2_2d() < d2.length2_2d()) - current_curve_radius = d1.length_2d() / 2.0f; + current_curve_radius = d1.length_2d(); //std::cout<<"\n Radius: " << current_curve_radius; float max_turn_speed =