diff --git a/src/karts/controller/arena_ai.cpp b/src/karts/controller/arena_ai.cpp index 675028c3d..0785829ff 100644 --- a/src/karts/controller/arena_ai.cpp +++ b/src/karts/controller/arena_ai.cpp @@ -343,8 +343,7 @@ void ArenaAI::configSpeed() else { // Otherwise accelerate - m_controls->setAccel(stk_config->m_ai_acceleration * handicap * - getSpeedCap()); + m_controls->setAccel(stk_config->m_ai_acceleration * handicap); } } // configSpeed diff --git a/src/karts/controller/arena_ai.hpp b/src/karts/controller/arena_ai.hpp index 6a772155f..40adaaac5 100644 --- a/src/karts/controller/arena_ai.hpp +++ b/src/karts/controller/arena_ai.hpp @@ -128,7 +128,6 @@ private: virtual bool isWaiting() const = 0; virtual bool isKartOnRoad() const = 0; virtual void resetAfterStop() {}; - virtual float getSpeedCap() const { return 1.0f; } public: ArenaAI(AbstractKart *kart); virtual ~ArenaAI() {}; diff --git a/src/karts/controller/spare_tire_ai.cpp b/src/karts/controller/spare_tire_ai.cpp index 21f994e51..572fa6676 100644 --- a/src/karts/controller/spare_tire_ai.cpp +++ b/src/karts/controller/spare_tire_ai.cpp @@ -20,6 +20,7 @@ #include "karts/abstract_kart.hpp" #include "karts/kart_gfx.hpp" +#include "karts/max_speed.hpp" #include "modes/three_strikes_battle.hpp" #include "tracks/arena_graph.hpp" #include "tracks/arena_node.hpp" @@ -51,6 +52,9 @@ void SpareTireAI::reset() void SpareTireAI::update(float dt) { assert(!m_fixed_target_nodes.empty()); + + m_kart->setSlowdown(MaxSpeed::MS_DECREASE_AI, 0.5f, /*fade_in_time*/0.0f); + BattleAI::update(dt); m_timer -= dt; if (m_timer < 0.0f) diff --git a/src/karts/controller/spare_tire_ai.hpp b/src/karts/controller/spare_tire_ai.hpp index a8d7cb76a..e68aabb2b 100644 --- a/src/karts/controller/spare_tire_ai.hpp +++ b/src/karts/controller/spare_tire_ai.hpp @@ -35,7 +35,6 @@ private: virtual void findClosestKart(bool use_difficulty) OVERRIDE {} virtual void findTarget() OVERRIDE; - virtual float getSpeedCap() const OVERRIDE { return 0.7f; } void findDefaultPath(); public: SpareTireAI(AbstractKart *kart);