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

Commit 1275bbc

Browse files
committed
Fix
If actor holds no thrown device and the arms state is throwing_prep then change the arms state to weapon_ready.
1 parent 2fb90b6 commit 1275bbc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Entities/AHuman.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3485,6 +3485,7 @@ void AHuman::Update()
34853485
////////////////////////////////////
34863486
// Fire/Activate held devices
34873487

3488+
ThrownDevice *pThrown = nullptr;
34883489
if (m_pFGArm && m_pFGArm->IsAttached())
34893490
{
34903491
// DOn't reach toward anything
@@ -3502,7 +3503,7 @@ void AHuman::Update()
35023503
// Throw whatever is held if it's a thrown device
35033504
else if (m_pFGArm->GetHeldMO())
35043505
{
3505-
ThrownDevice *pThrown = dynamic_cast<ThrownDevice *>(m_pFGArm->GetHeldMO());
3506+
pThrown = dynamic_cast<ThrownDevice *>(m_pFGArm->GetHeldMO());
35063507
if (pThrown)
35073508
{
35083509
if (m_Controller.IsState(WEAPON_FIRE))
@@ -3569,6 +3570,10 @@ void AHuman::Update()
35693570
m_pFGArm->SetHandPos(m_Pos + (m_HolsterOffset + Vector(15, -15)).GetXFlipped(m_HFlipped));
35703571
}
35713572

3573+
if (!pThrown && m_ArmsState == THROWING_PREP) {
3574+
m_ArmsState = WEAPON_READY;
3575+
}
3576+
35723577
if (m_pBGArm && m_pBGArm->IsAttached() && m_pBGArm->HoldsHeldDevice())
35733578
{
35743579
m_pBGArm->GetHeldDevice()->SetSharpAim(m_SharpAimProgress);

0 commit comments

Comments
 (0)