From 7de07a77223c15e9b5b001d0a58f9b2b1f16eef0 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Thu, 30 Nov 2023 04:21:18 -0600 Subject: [PATCH] fix: use defaults when getting variables for jetpack behavior (#1328) Tested that the hover jetpack now works and that the normal jetpack still works --- dGame/dBehaviors/JetPackBehavior.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dGame/dBehaviors/JetPackBehavior.cpp b/dGame/dBehaviors/JetPackBehavior.cpp index 134dd0fb..7fcd78b0 100644 --- a/dGame/dBehaviors/JetPackBehavior.cpp +++ b/dGame/dBehaviors/JetPackBehavior.cpp @@ -38,10 +38,12 @@ void JetPackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bit } void JetPackBehavior::Load() { - this->m_WarningEffectID = GetInt("warning_effect_id"); - this->m_Airspeed = GetFloat("airspeed"); - this->m_MaxAirspeed = GetFloat("max_airspeed"); - this->m_VerticalVelocity = GetFloat("vertical_velocity"); - this->m_EnableHover = GetBoolean("enable_hover"); - this->m_BypassChecks = GetBoolean("bypass_checks", true); + this->m_WarningEffectID = GetInt("warning_effect_id", -1); + this->m_Airspeed = GetFloat("airspeed", 10); + this->m_MaxAirspeed = GetFloat("max_airspeed", 15); + this->m_VerticalVelocity = GetFloat("vertical_velocity", 1); + this->m_EnableHover = GetBoolean("enable_hover", false); + + // TODO: Implement proper jetpack checks, so we can set this default to false + this->m_BypassChecks = GetBoolean("bypass_checks", true); }