From a475f3544c046cc619254fcba0b70ca4788eeb57 Mon Sep 17 00:00:00 2001 From: Alan Shen Date: Wed, 14 Oct 2026 23:50:00 -0600 Subject: [PATCH] Play the sprint legs only at sprint speed A player holding the sprint key played the sprint legs (Run_lower) at any speed: from 69 u/s at a standing sprint start, and at a few u/s when stopping with the key held, so the feet slid. Classic NEOTOKYO plays them only above 175 u/s. neo's slowest sprints (185 u/s) dip below 175 at every turn, which would swap the legs back and forth, so the switch is at 100 u/s, the 2006 SDK's top walking speed. --- src/game/shared/hl2mp/hl2mp_playeranimstate.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/shared/hl2mp/hl2mp_playeranimstate.cpp b/src/game/shared/hl2mp/hl2mp_playeranimstate.cpp index 9e441acd87..a33dedf947 100644 --- a/src/game/shared/hl2mp/hl2mp_playeranimstate.cpp +++ b/src/game/shared/hl2mp/hl2mp_playeranimstate.cpp @@ -405,6 +405,12 @@ bool CHL2MPPlayerAnimState::HandleSwimming( Activity &idealActivity ) return bInWater; } +#ifdef NEO +// Sprinting below this speed (from a stand, or stopping with the key held) plays the walk legs, as the sprint legs slide; +// classic NEOTOKYO switches at 175 u/s, which neo's slowest sprints (185 u/s) dip below at every turn +static constexpr float SPRINT_LEGS_MIN_SPEED = 100.0f; +#endif + //----------------------------------------------------------------------------- // Purpose: // Input : *idealActivity - @@ -413,7 +419,7 @@ bool CHL2MPPlayerAnimState::HandleSwimming( Activity &idealActivity ) bool CHL2MPPlayerAnimState::HandleMoving( Activity &idealActivity ) { #ifdef NEO - if (m_pHL2MPPlayer->IsSprinting()) + if (m_pHL2MPPlayer->IsSprinting() && GetOuterXYSpeed() > SPRINT_LEGS_MIN_SPEED) { idealActivity = ACT_RUN; }