Skip to content

Commit 7014cad

Browse files
committed
Reset walk crouching when jumping
1 parent cc0e182 commit 7014cad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Entities/AHuman.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,6 +1690,8 @@ void AHuman::OnNewMovePath()
16901690
//////////////////////////////////////////////////////////////////////////////////////////
16911691

16921692
void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
1693+
m_WalkPathOffset.Reset();
1694+
16931695
if (m_Controller.IsState(BODY_JUMP)) {
16941696
m_WalkAngle[whichLayer] = Matrix(c_QuarterPI * GetFlipFactor());
16951697
} else {
@@ -1734,8 +1736,6 @@ void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
17341736
// Adjust our X offset to try to keep our legs under our centre-of-mass
17351737
float predictedPosition = ((m_pHead->GetPos().m_X - m_Pos.m_X) * 0.15F) + m_Vel.m_X;
17361738
m_WalkPathOffset.m_X = predictedPosition;
1737-
} else {
1738-
m_WalkPathOffset.Reset();
17391739
}
17401740
}
17411741
}

0 commit comments

Comments
 (0)