fix: use defaults when getting variables for jetpack behavior (#1328)

Tested that the hover jetpack now works and that the normal jetpack still works
This commit is contained in:
Aaron Kimbrell
2023-11-30 04:21:18 -06:00
committed by GitHub
parent 62a1e135c3
commit 7de07a7722

View File

@@ -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);
}