Renamed 'slowdownTime' in materials.xml file to 'slowdown' which more
accurately reflects what it is. Re-scaled the slowdown from '10' = normal to '1' =normal and removed stk_config paramter for this scaling factor. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4495 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -24,9 +24,6 @@ max-history is the maximum number of history frames.
|
||||
max-skidmarks is the max. number o skidmarks per kart.
|
||||
skid-fadeout-time is the time till the skid marks fade out
|
||||
|
||||
slowdown-factor is the engine reduction depending on terrain; see kart for
|
||||
details
|
||||
|
||||
near-ground is the distance above ground when the upright constraint will be
|
||||
disabled to allow more violent explosions.
|
||||
|
||||
@@ -50,7 +47,6 @@ final-camera-time is the time for the final camera to reach it's destination
|
||||
max-history="10000"
|
||||
max-skidmarks="100"
|
||||
skid-fadeout-time="60"
|
||||
slowdown-factor="10"
|
||||
near-ground="2"
|
||||
delay-finish-time="10"
|
||||
music-credit-time="10"
|
||||
|
||||
@@ -58,7 +58,7 @@ Material::Material(const XMLNode *node, int index)
|
||||
node->get("reset", &m_resetter );
|
||||
node->get("collide", &m_collideable );
|
||||
node->get("maxSpeed", &m_max_speed_fraction);
|
||||
node->get("slowdownTime", &m_slowdown );
|
||||
node->get("slowdown", &m_slowdown );
|
||||
std::string s("");
|
||||
node->get("graphical-effect", &s );
|
||||
if(s=="water")
|
||||
@@ -107,7 +107,7 @@ void Material::init(unsigned int index)
|
||||
m_resetter = false;
|
||||
m_collideable = true;
|
||||
m_max_speed_fraction = 1.0f;
|
||||
m_slowdown = stk_config->m_slowdown_factor;
|
||||
m_slowdown = 1.0f;
|
||||
m_graphical_effect = GE_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ void Kart::reset()
|
||||
m_skidding = 1.0f;
|
||||
m_time_last_crash = 0.0f;
|
||||
m_max_speed_reduction = 0.0f;
|
||||
m_power_reduction = 50.0f;
|
||||
m_power_reduction = 1.0f;
|
||||
m_slipstream_mode = SS_NONE;
|
||||
|
||||
m_controls.m_steer = 0.0f;
|
||||
@@ -672,7 +672,7 @@ void Kart::update(float dt)
|
||||
m_body->getBroadphaseHandle()->m_collisionFilterGroup = old_group;
|
||||
}
|
||||
const Material* material=getMaterial();
|
||||
m_power_reduction = 50.0f;
|
||||
m_power_reduction = 1.0f;
|
||||
if (getHoT()==Track::NOHIT) // kart falling off the track
|
||||
{
|
||||
// let kart fall a bit before rescuing
|
||||
@@ -983,7 +983,7 @@ void Kart::updatePhysics (float dt)
|
||||
// update() depending on terrain type. Don't apply this if kart is already
|
||||
// going slowly, this would make it hard accelerating to get out of there
|
||||
if(m_speed > 4.0)
|
||||
engine_power *= m_power_reduction/stk_config->m_slowdown_factor;
|
||||
engine_power *= m_power_reduction;
|
||||
|
||||
// Lose some traction when skidding, so it is not abused by player
|
||||
// The AI will be allowed to cheat on medium and hard difficulty in
|
||||
@@ -1031,7 +1031,7 @@ void Kart::updatePhysics (float dt)
|
||||
// normal terrain (power_reduction/slowdown_factor should
|
||||
// be 2.5 (which was experimentally determined to feel
|
||||
// right).
|
||||
float f = 2.5f - 3.8f*(1-m_power_reduction/stk_config->m_slowdown_factor);
|
||||
float f = 2.5f - 3.8f*(1-m_power_reduction);
|
||||
// Avoid that a kart gets really stuck:
|
||||
if(f<0.1f) f=0.1f;
|
||||
m_vehicle->applyEngineForce(-engine_power*f, 2);
|
||||
|
||||
Reference in New Issue
Block a user