diff --git a/src/graphics/slip_stream.cpp b/src/graphics/slip_stream.cpp index 9bfe14b6b..42f103e86 100644 --- a/src/graphics/slip_stream.cpp +++ b/src/graphics/slip_stream.cpp @@ -916,7 +916,7 @@ void SlipStream::updateSpeedIncrease() const KartProperties* kp = m_kart->getKartProperties(); float speed_increase = kp->getSlipstreamMaxSpeedIncrease(); float add_power = kp->getSlipstreamAddPower(); - int fade_out = kp->getSlipstreamFadeOutTicks(); + int fade_out = stk_config->time2Ticks(kp->getSlipstreamFadeOutTime()); m_kart->instantSpeedIncrease( MaxSpeed::MS_INCREASE_SLIPSTREAM, speed_increase, speed_increase, add_power, m_speed_increase_duration, fade_out); diff --git a/src/items/attachment.cpp b/src/items/attachment.cpp index c1dfc6786..651983bd0 100644 --- a/src/items/attachment.cpp +++ b/src/items/attachment.cpp @@ -354,7 +354,9 @@ void Attachment::hitBanana(ItemState *item_state) { case ATTACH_PARACHUTE: { - set(ATTACH_PARACHUTE, kp->getParachuteDuration() + leftover_ticks); + int parachute_ticks = stk_config->time2Ticks( + kp->getParachuteDuration()) + leftover_ticks; + set(ATTACH_PARACHUTE, parachute_ticks); int initial_speed_round = (int)(m_kart->getSpeed() * 100.0f); initial_speed_round = irr::core::clamp(initial_speed_round, -32768, 32767); diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp index 02ff71e2e..4c8931382 100644 --- a/src/items/powerup.cpp +++ b/src/items/powerup.cpp @@ -449,7 +449,7 @@ void Powerup::use() kart->getAttachment() ->set(Attachment::ATTACH_PARACHUTE, - int(kp->getParachuteDurationOther()*rank_mult) ); + stk_config->time2Ticks(kp->getParachuteDurationOther()*rank_mult) ); if(kart->getController()->isLocalPlayerController()) player_kart = kart; diff --git a/src/items/rubber_band.cpp b/src/items/rubber_band.cpp index 3556db9bc..c99070f8c 100644 --- a/src/items/rubber_band.cpp +++ b/src/items/rubber_band.cpp @@ -204,10 +204,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), + stk_config->time2Ticks(kp->getPlungerBandFadeOutTime())); if(m_attached_state==RB_TO_KART) m_hit_kart->getBody()->applyCentralForce(diff*(-force)); } diff --git a/src/karts/controller/skidding_ai.cpp b/src/karts/controller/skidding_ai.cpp index 953eb8b88..06b303ff6 100644 --- a/src/karts/controller/skidding_ai.cpp +++ b/src/karts/controller/skidding_ai.cpp @@ -1246,7 +1246,7 @@ void SkiddingAI::handleItems(const float dt, const Vec3 *aim_point, int last_nod case PowerupManager::POWERUP_PARACHUTE: { // Wait one second more than a previous parachute - if(m_time_since_last_shot > stk_config->ticks2Time(m_kart->getKartProperties()->getParachuteDurationOther()) + 1.0f) + if(m_time_since_last_shot > m_kart->getKartProperties()->getParachuteDurationOther() + 1.0f) m_controls->setFire(true); break; }// POWERUP_PARACHUTE diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index fe8573227..57b60b26c 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1150,9 +1150,9 @@ void Kart::collectedItem(ItemState *item_state) ((World::getWorld()->getTicksSinceStart() / 10) % 2 == 0) ? true : false; m_max_speed->setSlowdown(MaxSpeed::MS_DECREASE_BUBBLE, - m_kart_properties->getBubblegumSpeedFraction() , - m_kart_properties->getBubblegumFadeInTicks(), - m_bubblegum_ticks); + m_kart_properties->getBubblegumSpeedFraction() , + stk_config->time2Ticks(m_kart_properties->getBubblegumFadeInTime()), + m_bubblegum_ticks); if (!RewindManager::get()->isRewinding()) getNextEmitter()->play(getXYZ(), m_goo_sound); diff --git a/src/utils/debug.cpp b/src/utils/debug.cpp index b83ee0b05..db30082f4 100644 --- a/src/utils/debug.cpp +++ b/src/utils/debug.cpp @@ -182,7 +182,8 @@ void addAttachment(Attachment::AttachmentType type) else if (type == Attachment::ATTACH_PARACHUTE) { kart->getAttachment() - ->set(type, kart->getKartProperties()->getParachuteDuration() ); + ->set(type, stk_config->time2Ticks( + kart->getKartProperties()->getParachuteDuration())); } else if (type == Attachment::ATTACH_BOMB) {