diff --git a/src/karts/controller/ai_properties.cpp b/src/karts/controller/ai_properties.cpp index 7c0c75b2a..b4c22e8e9 100644 --- a/src/karts/controller/ai_properties.cpp +++ b/src/karts/controller/ai_properties.cpp @@ -26,9 +26,6 @@ float AIProperties::UNDEFINED = -99.9f; /** Constructor. Sets all properties to the special UNDEFINED value. */ AIProperties::AIProperties(RaceManager::Difficulty difficulty) - : m_skid_probability(/*decreasing*/false) - , m_speed_cap(/*decreasing*/true) - , m_collect_item_probability(/*decreasing*/true) { switch(difficulty) { diff --git a/src/karts/kart_properties.cpp b/src/karts/kart_properties.cpp index b2fd3e67f..46999bf29 100644 --- a/src/karts/kart_properties.cpp +++ b/src/karts/kart_properties.cpp @@ -44,7 +44,6 @@ float KartProperties::UNDEFINED = -99.9f; * defined, it is guaranteed that each kart has well defined physics values). */ KartProperties::KartProperties(const std::string &filename) - : m_turn_angle_at_speed(/*decreasing*/true) { m_icon_material = NULL; m_minimap_icon = NULL; diff --git a/src/utils/interpolation_array.hpp b/src/utils/interpolation_array.hpp index 70212f748..9ed7c8cac 100644 --- a/src/utils/interpolation_array.hpp +++ b/src/utils/interpolation_array.hpp @@ -40,11 +40,8 @@ private: /* Pre-computed (x[i+1]-x[i])/(y[i+1]/-y[i]) . */ std::vector m_delta; - /** True if the Y values are decreasing. This flag is important when - * doing a reverse loopup (find X given Y). */ - bool m_decreasing; public: - InterpolationArray(bool decreasing) : m_decreasing(decreasing) {}; + InterpolationArray() {}; /** Adds the value pair x/y to the list of all points. It is tested * that the x values are added in order. @@ -114,7 +111,7 @@ public: { if(m_y.size()==1) return m_x[0]; - if(m_decreasing) + if(m_y[1] m_y[0]) return m_x[0];