From 5fc4473bd5da19489ec59cde0d16133a77bb4b04 Mon Sep 17 00:00:00 2001 From: mbjornstk Date: Mon, 7 Jun 2010 23:43:04 +0000 Subject: [PATCH] Disable AI cheat when skidding. All AI levels lose power now, like humans. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5484 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/kart.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index faace1f1e..e302e09a3 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1062,12 +1062,9 @@ void Kart::updatePhysics(float dt) if(m_speed > 4.0) engine_power *= m_power_reduction; - // Lose some traction when skidding, so it is not abused by player - // The AI will be allowed to cheat on medium and hard difficulty in - // order to make them more competitive (this might be removed once - // the AI is better). - if(m_controls.m_drift && - (race_manager->getDifficulty()==RaceManager::RD_EASY || m_controller->isPlayerController()) ) + // Lose some traction when skidding, to balance the adventage + // Up to r5483 AIs were allowed to cheat in medium and high diff levels + if(m_controls.m_drift) engine_power *= 0.5f; applyEngineForce(engine_power);