Some tuning to slow down.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2842 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
77dedf6cbf
commit
ac3d18c004
@ -15,6 +15,8 @@
|
||||
(max-history 10000) ;; maximum number of history frames.
|
||||
(max-skidmarks 100) ;; max. number of skidmarks per kart.
|
||||
(skid-fadeout-time 60) ;; Time till skidm marks fade out
|
||||
(slowdown-factor 10) ;; Engine reduction depending on terrain, see
|
||||
;; kart for details.
|
||||
(delay-finish-time 10) ;; delay till race results are displayed.
|
||||
(music-credit-time 10) ;; time for which the music credits are displayed.
|
||||
|
||||
|
@ -726,7 +726,7 @@ void Kart::updatePhysics (float dt)
|
||||
engine_power *= 5.0f;
|
||||
// Engine slow down due to terrain (see m_power_reduction is set in
|
||||
// update() depending on terrain type.
|
||||
engine_power *= m_power_reduction/50.0f;
|
||||
engine_power *= m_power_reduction/stk_config->m_slowdown_factor;
|
||||
m_vehicle->applyEngineForce(engine_power, 2);
|
||||
m_vehicle->applyEngineForce(engine_power, 3);
|
||||
// Either all or no brake is set, so test only one to avoid
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "file_manager.hpp"
|
||||
#include "material.hpp"
|
||||
#include "string_utils.hpp"
|
||||
#include "stk_config.hpp"
|
||||
|
||||
#define UCLAMP 1
|
||||
#define VCLAMP 2
|
||||
@ -111,8 +112,10 @@ Material::Material(const std::string& fname, char *description,
|
||||
m_max_speed_fraction = parseFloat(&description);
|
||||
m_slowdown = parseFloat(&description);
|
||||
// Set the optional parameters.
|
||||
if(m_max_speed_fraction <= 0.0f) m_max_speed_fraction = 1.0f;
|
||||
if(m_slowdown <= 0.0f) m_slowdown = 50.0f;
|
||||
if(m_max_speed_fraction <= 0.0f)
|
||||
m_max_speed_fraction = 1.0f;
|
||||
if(m_slowdown <= 0.0f)
|
||||
m_slowdown = stk_config->m_slowdown_factor;
|
||||
}
|
||||
install(is_full_path);
|
||||
} // Material
|
||||
@ -138,7 +141,7 @@ void Material::init(int index)
|
||||
m_resetter = false ;
|
||||
m_collideable = true ;
|
||||
m_max_speed_fraction = 1.0f;
|
||||
m_slowdown = 50.0f;
|
||||
m_slowdown = stk_config->m_slowdown_factor;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -108,6 +108,7 @@ void STKConfig::load(const std::string &filename)
|
||||
CHECK_NEG(m_max_history, "max-history" );
|
||||
CHECK_NEG(m_max_skidmarks, "max-skidmarks" );
|
||||
CHECK_NEG(m_skid_fadeout_time, "skid-fadeout-time" );
|
||||
CHECK_NEG(m_slowdown_factor, "slowdown-factor" );
|
||||
CHECK_NEG(m_delay_finish_time, "delay-finish-time" );
|
||||
CHECK_NEG(m_music_credit_time, "music-credit-time" );
|
||||
m_kart_properties.checkAllSet(filename);
|
||||
@ -129,6 +130,7 @@ void STKConfig::init_defaults()
|
||||
m_explosion_impulse = m_explosion_impulse_objects =
|
||||
m_shortcut_length = m_music_credit_time =
|
||||
m_delay_finish_time = m_skid_fadeout_time =
|
||||
m_slowdown_factor =
|
||||
UNDEFINED;
|
||||
m_max_karts = -100;
|
||||
m_grid_order = -100;
|
||||
@ -171,6 +173,7 @@ void STKConfig::getAllData(const lisp::Lisp* lisp)
|
||||
lisp->get("max-history", m_max_history );
|
||||
lisp->get("max-skidmarks", m_max_skidmarks );
|
||||
lisp->get("skid-fadeout-time", m_skid_fadeout_time );
|
||||
lisp->get("slowdown-factor", m_slowdown_factor );
|
||||
lisp->get("delay-finish-time", m_delay_finish_time );
|
||||
lisp->get("music-credit-time", m_music_credit_time );
|
||||
lisp->get("menu-background", m_menu_background );
|
||||
|
@ -68,7 +68,8 @@ public:
|
||||
int m_max_history; /**<Maximum number of frames to save in
|
||||
a history files. */
|
||||
int m_max_skidmarks; /**<Maximum number of skid marks/kart. */
|
||||
float m_skid_fadeout_time; /**<Time till skidmarks fade away. */
|
||||
float m_skid_fadeout_time; /**<Time till skidmarks fade away. */
|
||||
float m_slowdown_factor; /**<Used in terrain specific slowdown. */
|
||||
bool m_enable_networking;
|
||||
|
||||
std::vector<float>
|
||||
|
Loading…
x
Reference in New Issue
Block a user