Add enabled property to skid characteristics
This commit is contained in:
parent
b4904b182f
commit
2f1d08edbd
@ -163,7 +163,7 @@
|
|||||||
bonus-force="250 350"
|
bonus-force="250 350"
|
||||||
physical-jump-time="0" graphical-jump-time="0.4"
|
physical-jump-time="0" graphical-jump-time="0.4"
|
||||||
post-skid-rotate-factor="1"
|
post-skid-rotate-factor="1"
|
||||||
reduce-turn-min="0.2" reduce-turn-max="0.8" />
|
reduce-turn-min="0.2" reduce-turn-max="0.8" enabled="true" />
|
||||||
|
|
||||||
<!-- Camera
|
<!-- Camera
|
||||||
Distance between kart and camera.
|
Distance between kart and camera.
|
||||||
|
@ -262,6 +262,8 @@ AbstractCharacteristic::ValueType AbstractCharacteristic::getType(
|
|||||||
return TYPE_FLOAT;
|
return TYPE_FLOAT;
|
||||||
case SKID_REDUCE_TURN_MAX:
|
case SKID_REDUCE_TURN_MAX:
|
||||||
return TYPE_FLOAT;
|
return TYPE_FLOAT;
|
||||||
|
case SKID_ENABLED:
|
||||||
|
return TYPE_BOOL;
|
||||||
|
|
||||||
/* <characteristics-end getProp1> */
|
/* <characteristics-end getProp1> */
|
||||||
} // switch (type)
|
} // switch (type)
|
||||||
@ -484,6 +486,8 @@ std::string AbstractCharacteristic::getName(CharacteristicType type)
|
|||||||
return "SKID_REDUCE_TURN_MIN";
|
return "SKID_REDUCE_TURN_MIN";
|
||||||
case SKID_REDUCE_TURN_MAX:
|
case SKID_REDUCE_TURN_MAX:
|
||||||
return "SKID_REDUCE_TURN_MAX";
|
return "SKID_REDUCE_TURN_MAX";
|
||||||
|
case SKID_ENABLED:
|
||||||
|
return "SKID_ENABLED";
|
||||||
|
|
||||||
/* <characteristics-end getProp2> */
|
/* <characteristics-end getProp2> */
|
||||||
} // switch (type)
|
} // switch (type)
|
||||||
@ -1709,6 +1713,18 @@ float AbstractCharacteristic::getSkidReduceTurnMax() const
|
|||||||
return result;
|
return result;
|
||||||
} // getSkidReduceTurnMax
|
} // getSkidReduceTurnMax
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
bool AbstractCharacteristic::getSkidEnabled() const
|
||||||
|
{
|
||||||
|
bool result;
|
||||||
|
bool is_set = false;
|
||||||
|
process(SKID_ENABLED, &result, &is_set);
|
||||||
|
if (!is_set)
|
||||||
|
Log::fatal("AbstractCharacteristic", "Can't get characteristic %s",
|
||||||
|
getName(SKID_ENABLED).c_str());
|
||||||
|
return result;
|
||||||
|
} // getSkidEnabled
|
||||||
|
|
||||||
|
|
||||||
/* <characteristics-end getter> */
|
/* <characteristics-end getter> */
|
||||||
|
|
||||||
|
@ -216,6 +216,7 @@ public:
|
|||||||
SKID_POST_SKID_ROTATE_FACTOR,
|
SKID_POST_SKID_ROTATE_FACTOR,
|
||||||
SKID_REDUCE_TURN_MIN,
|
SKID_REDUCE_TURN_MIN,
|
||||||
SKID_REDUCE_TURN_MAX,
|
SKID_REDUCE_TURN_MAX,
|
||||||
|
SKID_ENABLED,
|
||||||
|
|
||||||
/* <characteristics-end enum> */
|
/* <characteristics-end enum> */
|
||||||
|
|
||||||
@ -380,6 +381,7 @@ public:
|
|||||||
float getSkidPostSkidRotateFactor() const;
|
float getSkidPostSkidRotateFactor() const;
|
||||||
float getSkidReduceTurnMin() const;
|
float getSkidReduceTurnMin() const;
|
||||||
float getSkidReduceTurnMax() const;
|
float getSkidReduceTurnMax() const;
|
||||||
|
bool getSkidEnabled() const;
|
||||||
|
|
||||||
/* <characteristics-end defs> */
|
/* <characteristics-end defs> */
|
||||||
};
|
};
|
||||||
|
@ -593,6 +593,8 @@ void XmlCharacteristic::load(const XMLNode *node)
|
|||||||
&m_values[SKID_REDUCE_TURN_MIN]);
|
&m_values[SKID_REDUCE_TURN_MIN]);
|
||||||
sub_node->get("reduce-turn-max",
|
sub_node->get("reduce-turn-max",
|
||||||
&m_values[SKID_REDUCE_TURN_MAX]);
|
&m_values[SKID_REDUCE_TURN_MAX]);
|
||||||
|
sub_node->get("enabled",
|
||||||
|
&m_values[SKID_ENABLED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ Rescue: duration, vertOffset, height
|
|||||||
Explosion: duration, radius, invulnerabilityTime
|
Explosion: duration, radius, invulnerabilityTime
|
||||||
Nitro: duration, engineForce, consumption, smallContainer, bigContainer, maxSpeedIncrease, fadeOutTime, max
|
Nitro: duration, engineForce, consumption, smallContainer, bigContainer, maxSpeedIncrease, fadeOutTime, max
|
||||||
Slipstream: duration, length, width, collectTime, useTime, addPower, minSpeed, maxSpeedIncrease, fadeOutTime
|
Slipstream: duration, length, width, collectTime, useTime, addPower, minSpeed, maxSpeedIncrease, fadeOutTime
|
||||||
Skid: increase, decrease, max, timeTillMax, visual, visualTime, revertVisualTime, minSpeed, timeTillBonus(std::vector<float>/floatVector), bonusSpeed(std::vector<float>/floatVector), bonusTime(std::vector<float>/floatVector), bonusForce(std::vector<float>/floatVector), physicalJumpTime, graphicalJumpTime, postSkidRotateFactor, reduceTurnMin, reduceTurnMax"""
|
Skid: increase, decrease, max, timeTillMax, visual, visualTime, revertVisualTime, minSpeed, timeTillBonus(std::vector<float>/floatVector), bonusSpeed(std::vector<float>/floatVector), bonusTime(std::vector<float>/floatVector), bonusForce(std::vector<float>/floatVector), physicalJumpTime, graphicalJumpTime, postSkidRotateFactor, reduceTurnMin, reduceTurnMax, enabled(bool)"""
|
||||||
|
|
||||||
""" A GroupMember is an attribute of a group.
|
""" A GroupMember is an attribute of a group.
|
||||||
In the xml files, a value will be assigned to it.
|
In the xml files, a value will be assigned to it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user