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

Commit 0abe37f

Browse files
committed
Re-equip BG item when exiting prone.
Move unequipped BG item into front of inventory so that the actor will consistently re-equip the same item.
1 parent f612dec commit 0abe37f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Entities/AHuman.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ bool AHuman::UnequipBGArm() {
12981298
if (m_pBGArm) {
12991299
if (HeldDevice *heldDevice = m_pBGArm->GetHeldDevice()) {
13001300
heldDevice->Deactivate();
1301-
AddToInventoryBack(m_pBGArm->RemoveAttachable(heldDevice));
1301+
AddToInventoryFront(m_pBGArm->RemoveAttachable(heldDevice));
13021302
m_pBGArm->SetHandPos(m_Pos + RotateOffset(m_HolsterOffset));
13031303
return true;
13041304
}
@@ -3151,7 +3151,10 @@ void AHuman::Update()
31513151
}
31523152
}
31533153
// Disengage the prone state as soon as crouch is released.
3154-
if (!crouching) { m_ProneState = NOTPRONE; }
3154+
if (!crouching && m_ProneState != NOTPRONE) {
3155+
EquipShieldInBGArm();
3156+
m_ProneState = NOTPRONE;
3157+
}
31553158
}
31563159

31573160
////////////////////////////////////

0 commit comments

Comments
 (0)