diff --git a/data/stk_config.xml b/data/stk_config.xml
index 37c5c1b60..ae81fe090 100644
--- a/data/stk_config.xml
+++ b/data/stk_config.xml
@@ -109,6 +109,10 @@
work anymore - so for now don't enable this. -->
+
+
+
diff --git a/src/config/stk_config.cpp b/src/config/stk_config.cpp
index 14bcf8601..9dc111f4b 100644
--- a/src/config/stk_config.cpp
+++ b/src/config/stk_config.cpp
@@ -177,6 +177,7 @@ void STKConfig::init_defaults()
m_smooth_normals = false;
m_same_powerup_mode = POWERUP_MODE_ONLY_IF_SAME;
m_ai_acceleration = 1.0f;
+ m_disable_steer_while_unskid = false;
m_score_increase.clear();
m_leader_intervals.clear();
@@ -252,6 +253,11 @@ void STKConfig::getAllData(const XMLNode * root)
news_node->get("max-display", &m_max_display_news);
}
+ if (const XMLNode *steer_node= root->getNode("steer"))
+ {
+ steer_node->get("disable-while-unskid", &m_disable_steer_while_unskid);
+ }
+
if (const XMLNode *music_node = root->getNode("music"))
{
std::string title_music;
diff --git a/src/config/stk_config.hpp b/src/config/stk_config.hpp
index 5cf2624d8..b9cf4542a 100644
--- a/src/config/stk_config.hpp
+++ b/src/config/stk_config.hpp
@@ -103,6 +103,12 @@ public:
before it is ignored. */
bool m_enable_networking;
+ /** Disable steering if skidding is stopped. This can help in making
+ * skidding more controllable (since otherwise when trying to steer while
+ * steering is reset to match the graphics it often results in the kart
+ * crashing). */
+ bool m_disable_steer_while_unskid;
+
float m_ai_acceleration; /**addMessage(StringUtils::insertValues(L"steer_val %i", steer_val), m_kart, 1.0f,
video::SColor(255, 255, 0, 255), false);
}
+
+ if(stk_config->m_disable_steer_while_unskid &&
+ !m_controls->m_skid &&
+ m_kart->getSkidding()->getVisualSkidRotation()!=0)
+ {
+ m_controls->m_steer = 0;
+ }
const float STEER_CHANGE = dt/m_kart->getTimeFullSteer(); // amount the steering is changed
if (steer_val < 0)
{