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

Commit aac41d6

Browse files
committed
FG arm should also attempt to crawl when no BG arm is present. Also, arm crawling should happen at an equal distance to the terrain surface on both arms, meaning that the X offset wont leave one arm at a disadvantage.
1 parent 66a9209 commit aac41d6

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

Entities/AHuman.cpp

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,35 +3717,13 @@ void AHuman::Update()
37173717
m_Paths[BGROUND][CRAWL].Terminate();
37183718

37193719
// ARMS using rotated path to help crawl
3720-
if (m_pBGArm)
3721-
{
3722-
m_ArmClimbing[BGROUND] = true;
3723-
// Reset the stride timer if the path is about to restart
3724-
// if (m_Paths[BGROUND][ARMCRAWL].PathEnded() || m_Paths[BGROUND][ARMCRAWL].PathIsAtStart())
3725-
// m_StrideStart = true;
3726-
m_pBGHandGroup->PushAsLimb(m_Pos + RotateOffset(m_pBGArm->GetParentOffset()),
3727-
m_Vel,
3728-
m_Rotation,
3729-
m_Paths[BGROUND][ARMCRAWL],
3730-
deltaTime,
3731-
0,
3732-
true);
3733-
}
3734-
/*
3735-
if (m_pFGArm)
3736-
{
3737-
m_ArmClimbing[FGROUND] = true;
3738-
// m_StrideStart = true;
3739-
m_pFGHandGroup->PushAsLimb(m_Pos + RotateOffset(m_pFGArm->GetParentOffset()),
3740-
m_Vel,
3741-
m_Rotation,
3742-
m_Paths[FGROUND][ARMCRAWL],
3743-
// mass,
3744-
deltaTime,
3745-
0,
3746-
true);
3747-
}
3748-
*/
3720+
if (m_pBGArm) {
3721+
m_ArmClimbing[BGROUND] = true;
3722+
m_pBGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pBGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[BGROUND][ARMCRAWL], deltaTime);
3723+
} else if (m_pFGArm && !m_pFGArm->HoldsSomething()) {
3724+
m_ArmClimbing[FGROUND] = true;
3725+
m_pFGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pFGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[FGROUND][ARMCRAWL], deltaTime);
3726+
}
37493727

37503728
// Restart the stride if the current one seems to be taking too long
37513729
if (m_StrideTimer.IsPastSimMS(m_Paths[FGROUND][CRAWL].GetTotalPathTime()))

0 commit comments

Comments
 (0)