From b04194303a8b24cf5e1f77153ad9ddabcb24e22e Mon Sep 17 00:00:00 2001 From: hikerstk Date: Wed, 17 Oct 2012 06:14:43 +0000 Subject: [PATCH] AIs will now reduce their speed if they are too far ahead of the player. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11697 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/stk_config.xml | 7 +++- src/karts/controller/ai_properties.cpp | 26 +++++++------- src/karts/controller/ai_properties.hpp | 12 ++++++- src/karts/controller/skidding_ai.cpp | 49 ++++++++++++++------------ src/karts/controller/skidding_ai.hpp | 4 +++ 5 files changed, 62 insertions(+), 36 deletions(-) diff --git a/data/stk_config.xml b/data/stk_config.xml index 2895b3d64..7554563c9 100644 --- a/data/stk_config.xml +++ b/data/stk_config.xml @@ -249,12 +249,17 @@ distance ahead, the value for the largest distance is used, and similarly if the kart is more than the minimum value behind). + speed-cap: Fraction of maximum speed the kart should drive + at. Used to slow down karts that are ahead of the player. + Note that setting this to a value >1 does NOT increase + the speed the kart can drive at! --> + rb-skid-probability="-50:1.0 -20:0.7 20:0.2 50:0.0" + speed-cap="10:1.0 50:0.8"/>