Fixed regression issue with rocket boosting while using Hold for Boost scenario. (#1929)

This commit is contained in:
gir489 2023-08-06 14:52:55 -04:00 committed by GitHub
parent e1c0f97cd3
commit 32472ff524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,23 +36,20 @@ namespace big
{ {
if (PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_ROCKET_BOOST) || PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_FLY_BOOST)) if (PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_ROCKET_BOOST) || PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_FLY_BOOST))
{ {
if (is_rocket) if (is_rocket && vehicle->m_boost_state)
{ {
if (vehicle->m_boost_state) vehicle->m_boost_allow_recharge = true;
{ vehicle->m_boost = 3.f;
vehicle->m_boost_allow_recharge = true;
vehicle->m_boost = 3.f;
}
else if (vehicle->m_boost_state)
{
vehicle->m_boost_state = false;
}
} }
else else if (is_kers)
{ {
vehicle->m_kers_boost = vehicle->m_kers_boost_max - 0.01f; vehicle->m_kers_boost = vehicle->m_kers_boost_max - 0.01f;
} }
} }
else if (is_rocket && vehicle->m_boost_state)
{
vehicle->m_boost_state = false;
}
} }
} }
} }