Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit d8acc1b

Browse files
committed
Revert "AHuman jetpack throttle edits"
This reverts commit 6aa0f56.
1 parent 6aa0f56 commit d8acc1b

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
281281

282282
<details><summary><b>Changed</b></summary>
283283

284-
- `AHuman`'s jetpack will now boost its throttle according to its throttle multipliers and the actor's inventory weight. This results in proportionally faster depletion of jetpack fuel.
285-
286284
- `ACrab` actors will now default to showing their `Turret` sprite as their GUI icon. If no turret is defined, the `ACrab`'s own sprite will be used.
287285
In a similar fashion, `AHuman` will now default to its torso sprite as its GUI representation if no `Head` has somehow been defined.
288286

Entities/AHuman.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,20 +3159,17 @@ void AHuman::Update()
31593159
if (m_JetTimeTotal > 0) {
31603160
// Jetpack throttle depletes relative to jet time, but only if throttle range values have been defined
31613161
float jetTimeRatio = std::max(m_JetTimeLeft / m_JetTimeTotal, 0.0F);
3162-
float carriedMass = GetInventoryMass() + GetEquippedMass();
3163-
m_pJetpack->SetThrottle(jetTimeRatio * (1.0F + carriedMass / std::max(GetMass() - carriedMass, 1.0F)) - 1.0F);
3162+
m_pJetpack->SetThrottle(jetTimeRatio * 2.0F - 1.0F);
31643163
}
3165-
float thrustCost = g_TimerMan.GetDeltaTimeMS() * m_pJetpack->GetThrottleFactor();
3166-
float burstCost = thrustCost * 10.0F;
3167-
if (m_Controller.IsState(BODY_JUMPSTART) && m_JetTimeLeft >= burstCost && m_Status != INACTIVE) {
3164+
if (m_Controller.IsState(BODY_JUMPSTART) && m_JetTimeLeft > 0 && m_Status != INACTIVE) {
31683165
m_pJetpack->TriggerBurst();
31693166
m_ForceDeepCheck = true;
31703167
m_pJetpack->EnableEmission(true);
3171-
m_JetTimeLeft -= burstCost;
3172-
} else if ((m_Controller.IsState(BODY_JUMP) || (m_MoveState == JUMP && m_Controller.IsState(PIE_MENU_ACTIVE))) && m_JetTimeLeft >= thrustCost && m_Status != INACTIVE) {
3168+
m_JetTimeLeft = std::max(m_JetTimeLeft - g_TimerMan.GetDeltaTimeMS() * 10.0F, 0.0F);
3169+
} else if ((m_Controller.IsState(BODY_JUMP) || (m_MoveState == JUMP && m_Controller.IsState(PIE_MENU_ACTIVE))) && m_JetTimeLeft > 0 && m_Status != INACTIVE) {
31733170
m_pJetpack->EnableEmission(true);
31743171
m_pJetpack->AlarmOnEmit(m_Team);
3175-
m_JetTimeLeft -= thrustCost;
3172+
m_JetTimeLeft = std::max(m_JetTimeLeft - g_TimerMan.GetDeltaTimeMS(), 0.0F);
31763173
m_MoveState = JUMP;
31773174
m_Paths[FGROUND][JUMP].Restart();
31783175
m_Paths[BGROUND][JUMP].Restart();

0 commit comments

Comments
 (0)