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

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Jan 1, 2024
1 parent 35545b6 commit 0a8ddc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Entities/AHuman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1749,12 +1749,12 @@ void AHuman::UpdateCrouching() {
desiredWalkPathYOffset = m_CrouchAmountOverride * m_MaxWalkPathCrouchShift;
}

float finalWalkPathYOffset = std::clamp(LERP(0.0F, 1.0F, -m_WalkPathOffset.m_Y, desiredWalkPathYOffset, 0.3F), 0.0F, m_MaxWalkPathCrouchShift);
float finalWalkPathYOffset = std::clamp(Lerp(0.0F, 1.0F, -m_WalkPathOffset.m_Y, desiredWalkPathYOffset, 0.3F), 0.0F, m_MaxWalkPathCrouchShift);
m_WalkPathOffset.m_Y = -finalWalkPathYOffset;

// If crouching, move at reduced speed
const float crouchSpeedMultiplier = 0.5F;
float travelSpeedMultiplier = LERP(0.0F, m_MaxWalkPathCrouchShift, 1.0F, crouchSpeedMultiplier, -m_WalkPathOffset.m_Y);
float travelSpeedMultiplier = Lerp(0.0F, m_MaxWalkPathCrouchShift, 1.0F, crouchSpeedMultiplier, -m_WalkPathOffset.m_Y);
m_Paths[FGROUND][WALK].SetTravelSpeedMultiplier(travelSpeedMultiplier);
m_Paths[BGROUND][WALK].SetTravelSpeedMultiplier(travelSpeedMultiplier);

Expand Down Expand Up @@ -2687,7 +2687,7 @@ void AHuman::Update()

// Lean forwards when crouching
float crouchAngleAdjust = m_HFlipped ? m_MaxCrouchRotation : -m_MaxCrouchRotation;
rotTarget += LERP(0.0F, m_MaxWalkPathCrouchShift, 0.0F, crouchAngleAdjust, m_WalkPathOffset.m_Y * -1.0F);
rotTarget += Lerp(0.0F, m_MaxWalkPathCrouchShift, 0.0F, crouchAngleAdjust, m_WalkPathOffset.m_Y * -1.0F);

float rotDiff = rot - rotTarget;
m_AngularVel = m_AngularVel * (0.98F - 0.06F * (m_Health / m_MaxHealth)) - (rotDiff * 0.5F);
Expand Down

0 comments on commit 0a8ddc0

Please sign in to comment.