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

Commit

Permalink
Reset walk crouching when jumping
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 27, 2023
1 parent cc0e182 commit 7014cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Entities/AHuman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,8 @@ void AHuman::OnNewMovePath()
//////////////////////////////////////////////////////////////////////////////////////////

void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
m_WalkPathOffset.Reset();

if (m_Controller.IsState(BODY_JUMP)) {
m_WalkAngle[whichLayer] = Matrix(c_QuarterPI * GetFlipFactor());
} else {
Expand Down Expand Up @@ -1734,8 +1736,6 @@ void AHuman::UpdateWalkAngle(AHuman::Layer whichLayer) {
// Adjust our X offset to try to keep our legs under our centre-of-mass
float predictedPosition = ((m_pHead->GetPos().m_X - m_Pos.m_X) * 0.15F) + m_Vel.m_X;
m_WalkPathOffset.m_X = predictedPosition;
} else {
m_WalkPathOffset.Reset();
}
}
}
Expand Down

0 comments on commit 7014cad

Please sign in to comment.