From 06d30d1b77933a93f74624ed37a69fd4c0e16395 Mon Sep 17 00:00:00 2001 From: ilikecats Date: Fri, 5 Jul 2024 18:25:32 -0700 Subject: [PATCH] At the start of a race, give 1 nitro, and give nitro when used (instead of taking away, effectivly infinite nitro) --- src/karts/kart.cpp | 2 +- src/karts/kart_properties.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 1efa7fe2e..f0d433067 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -377,7 +377,7 @@ void Kart::reset() m_invulnerable_ticks = 0; m_min_nitro_ticks = 0; m_energy_to_min_ratio = 0; - m_collected_energy = 0; + m_collected_energy = 1; m_bounce_back_ticks = 0; m_brake_ticks = 0; m_ticks_last_crash = 0; diff --git a/src/karts/kart_properties.cpp b/src/karts/kart_properties.cpp index d7c1a68eb..ff2e6ec93 100644 --- a/src/karts/kart_properties.cpp +++ b/src/karts/kart_properties.cpp @@ -1150,19 +1150,20 @@ float KartProperties::getNitroDuration() const // ---------------------------------------------------------------------------- float KartProperties::getNitroEngineForce() const { - return m_cached_characteristic->getNitroEngineForce(); + return m_cached_characteristic->getNitroEngineForce() * 1.5f; } // getNitroEngineForce // ---------------------------------------------------------------------------- float KartProperties::getNitroEngineMult() const { - return m_cached_characteristic->getNitroEngineMult(); + return m_cached_characteristic->getNitroEngineMult() * 1.5f; } // getNitroEngineMult // ---------------------------------------------------------------------------- float KartProperties::getNitroConsumption() const { - return m_cached_characteristic->getNitroConsumption(); + // Reverse nitro consumption (makes you gain nitro instead of losing it) + return 0.0f - m_cached_characteristic->getNitroConsumption(); } // getNitroConsumption // ---------------------------------------------------------------------------- @@ -1180,7 +1181,9 @@ float KartProperties::getNitroBigContainer() const // ---------------------------------------------------------------------------- float KartProperties::getNitroMaxSpeedIncrease() const { - return m_cached_characteristic->getNitroMaxSpeedIncrease(); + // This is the biggest float that can be represented. + return 340282346638528859811704183484516925440.0f; + //return m_cached_characteristic->getNitroMaxSpeedIncrease(); } // getNitroMaxSpeedIncrease // ----------------------------------------------------------------------------