Removed unnecessary parameter of InterpolationArray constructor.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11819 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b039f43a42
commit
7b43e95fa8
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -40,11 +40,8 @@ private:
|
||||
/* Pre-computed (x[i+1]-x[i])/(y[i+1]/-y[i]) . */
|
||||
std::vector<float> 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]) // if decreasing values
|
||||
{
|
||||
if(y > m_y[0]) return m_x[0];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user