Skip to content

Commit 675d735

Browse files
authored
Merge pull request #107 from cortex-command-community/bugfix/Supportable-SupportOffsetReloading
Fixed issue regarding Supportable and SupportOffsetWhileReloading
2 parents d103320 + f2f7ec5 commit 675d735

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010

1111
- Fixed Constructor auto-cancelling build mode if you actively selected the "Order Construction" pie menu option.
1212

13-
- Fixed regression introduced in v6.2.0 preventing Massacre, One-Man Army, One-Man Army (Diggers Only), and Survival from spawning enemies at all.
13+
- Fixed issue where the offhand wouldn't default to the `IdleOffset` of it's arm when the current held device had `Supportable = 0`.
14+
15+
- Fixed edge case where having a device with `UseSupportOffsetWhileReloading = 1`, and `Supportable = 0/1` depending on if it was reloading or not, would result in the gun not being held by the support hand when reloading.
16+
17+
- Fixed regression introduced in v6.2.0 preventing Massacre, One-Man Army, One-Man Army (Diggers Only), and Survival from spawning enemies at all.
1418

1519
</details>
1620

Source/Entities/AHuman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ void AHuman::PreControllerUpdate() {
22432243
} else if (heldDevice) {
22442244
if (HeldDevice* bgDevice = GetEquippedBGItem(); bgDevice && !heldDevice->IsOneHanded()) {
22452245
UnequipBGArm();
2246-
} else if (!bgDevice && !heldDevice->IsReloading() && heldDevice->IsSupportable()) {
2246+
} else if (!bgDevice && (!heldDevice->IsReloading() || heldDevice->GetUseSupportOffsetWhileReloading()) && heldDevice->IsSupportable()) {
22472247
m_pBGArm->SetHeldDeviceThisArmIsTryingToSupport(heldDevice);
22482248

22492249
if (!m_pBGArm->HasAnyHandTargets() && m_pBGArm->GetHandHasReachedCurrentTarget()) {

Source/Entities/Arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void Arm::Update() {
181181
m_AngularVel = 0.0F;
182182
}
183183

184-
if (m_HeldDeviceThisArmIsTryingToSupport && (!m_HeldDeviceThisArmIsTryingToSupport->IsSupportable() || m_HeldDeviceThisArmIsTryingToSupport->GetSupportOffset().MagnitudeIsGreaterThan(m_MaxLength * 2.0F))) {
184+
if (m_HeldDeviceThisArmIsTryingToSupport && (!m_HeldDeviceThisArmIsTryingToSupport->IsSupportable() || !m_HeldDeviceThisArmIsTryingToSupport->IsBeingHeld() || m_HeldDeviceThisArmIsTryingToSupport->GetSupportOffset().MagnitudeIsGreaterThan(m_MaxLength * 2.0F))) {
185185
m_HeldDeviceThisArmIsTryingToSupport = nullptr;
186186
}
187187

0 commit comments

Comments
 (0)