Fixed more ticks vs time issues.
This commit is contained in:
parent
c8befd7505
commit
8a8b954bf9
@ -829,8 +829,7 @@ void SlipStream::update(int ticks)
|
||||
kp->getSlipstreamMaxSpeedIncrease(),
|
||||
kp->getSlipstreamMaxSpeedIncrease(),
|
||||
kp->getSlipstreamAddPower(),
|
||||
m_bonus_time,
|
||||
stk_config->ticks2Time(fade_out) );
|
||||
stk_config->time2Ticks(m_bonus_time), fade_out);
|
||||
}
|
||||
|
||||
if(!is_sstreaming)
|
||||
|
@ -194,10 +194,10 @@ void RubberBand::update(int ticks)
|
||||
diff.normalize(); // diff can't be zero here
|
||||
m_owner->getBody()->applyCentralForce(diff*force);
|
||||
m_owner->increaseMaxSpeed(MaxSpeed::MS_INCREASE_RUBBER,
|
||||
kp->getPlungerBandSpeedIncrease(),
|
||||
/*engine_force*/ 0.0f,
|
||||
/*duration*/stk_config->time2Ticks(0.1f),
|
||||
kp->getPlungerBandFadeOutTicks());
|
||||
kp->getPlungerBandSpeedIncrease(),
|
||||
/*engine_force*/ 0.0f,
|
||||
/*duration*/stk_config->time2Ticks(0.1f),
|
||||
kp->getPlungerBandFadeOutTicks() );
|
||||
if(m_attached_state==RB_TO_KART)
|
||||
m_hit_kart->getBody()->applyCentralForce(diff*(-force));
|
||||
}
|
||||
|
@ -307,8 +307,8 @@ public:
|
||||
* \param fade_out_time How long the maximum speed will fade out linearly.
|
||||
*/
|
||||
virtual void increaseMaxSpeed(unsigned int category, float add_speed,
|
||||
float engine_force, float duration,
|
||||
float fade_out_time) = 0;
|
||||
float engine_force, int duration,
|
||||
int fade_out_time) = 0;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** This adjusts the top speed using increaseMaxSpeed, but additionally
|
||||
@ -323,8 +323,8 @@ public:
|
||||
* \param fade_out_time How long the maximum speed will fade out linearly.
|
||||
*/
|
||||
virtual void instantSpeedIncrease(unsigned int category, float add_max_speed,
|
||||
float speed_boost, float engine_force, float duration,
|
||||
float fade_out_time) = 0;
|
||||
float speed_boost, float engine_force,
|
||||
int duration, int fade_out_time) = 0;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Defines a slowdown, which is in fraction of top speed.
|
||||
|
@ -460,23 +460,20 @@ void Kart::setXYZ(const Vec3& a)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
void Kart::increaseMaxSpeed(unsigned int category, float add_speed,
|
||||
float engine_force, float duration,
|
||||
float fade_out_time)
|
||||
float engine_force, int duration,
|
||||
int fade_out_time)
|
||||
{
|
||||
m_max_speed->increaseMaxSpeed(category, add_speed, engine_force,
|
||||
stk_config->time2Ticks(duration),
|
||||
stk_config->time2Ticks(fade_out_time));
|
||||
duration, fade_out_time);
|
||||
} // increaseMaxSpeed
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
void Kart::instantSpeedIncrease(unsigned int category, float add_max_speed,
|
||||
float speed_boost, float engine_force, float duration,
|
||||
float fade_out_time)
|
||||
float speed_boost, float engine_force,
|
||||
int duration, int fade_out_time)
|
||||
{
|
||||
m_max_speed->instantSpeedIncrease(category, add_max_speed, speed_boost,
|
||||
engine_force,
|
||||
stk_config->time2Ticks(duration),
|
||||
stk_config->time2Ticks(fade_out_time) );
|
||||
engine_force, duration, fade_out_time);
|
||||
} // instantSpeedIncrease
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -278,11 +278,11 @@ public:
|
||||
virtual void startEngineSFX ();
|
||||
virtual void adjustSpeed (float f);
|
||||
virtual void increaseMaxSpeed(unsigned int category, float add_speed,
|
||||
float engine_force, float duration,
|
||||
float fade_out_time);
|
||||
float engine_force, int duration,
|
||||
int fade_out_time) OVERRIDE;
|
||||
virtual void instantSpeedIncrease(unsigned int category, float add_max_speed,
|
||||
float speed_boost, float engine_force, float duration,
|
||||
float fade_out_time);
|
||||
float speed_boost, float engine_force,
|
||||
int duration, int fade_out_time) OVERRIDE;
|
||||
virtual void setSlowdown(unsigned int category, float max_speed_fraction,
|
||||
int fade_in_time);
|
||||
virtual int getSpeedIncreaseTicksLeft(unsigned int category) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user