Repository navigation
[WONTFIX?] Play the sprint legs only at sprint speed - #2242
Draft
sunzenshen wants to merge 1 commit into
Draft
sunzenshen wants to merge 1 commit into
sunzenshen wants to merge 1 commit into
Conversation
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.
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Case 4: sprint legs at walking speed.
Review page: exported review page (Dropbox) · live review page (opening it lets you request access with your email or Claude account).
HandleMovingplays the sprint legs (Run_lower, authored at about 130 u/s) wheneverIsSprinting()is set, whatever the speed. Sprint starts as soon as the key is held and the player moves, so a sprint from a stand plays the sprint legs from the first frames (74 u/s), and a player who stops with the key still held keeps them down to 1 u/s, with the feet sliding. Classic NEOTOKYO picks the legs by speed only (walk_lowerup to 175 u/s,Run_lowerabove, as the 2006 SDK does), so its sprint legs never play slowly.This PR keeps the sprint key as the trigger and adds a speed: the sprint legs play only above 100 u/s (2D). One condition and one named constant: +7 / -1 lines (with the
#ifdef NEOguard and a two-line comment) inhl2mp_playeranimstate.cpp. The Source SDK base has nothing to call here:CMultiPlayerAnimState::HandleMovingalways runs (ACT_MP_RUN), and the 2006 base's speed rule lives in the SDK template, which neo does not derive from.Why 100 u/s and not classic's 175: neo's slowest sprints are 185 u/s (Assault with a 0.725 speed-scale rifle), and bots sprint through turns at 100-180 u/s. Replaying the frames of a 10-bot master log through each threshold, the legs would swap walk/run inside a sprint 29 times in 24 sprints at 175, 13 at 130, and 3 at 100. 100 u/s is also the 2006 base's top walking speed (classic's
ACT_WALKmaximum ground speed). Players see the difference from classic only while sprinting at 100-175 u/s, which lasts one or two frames at a start and about 0.1 s at a stop.Independent of the other animation PRs from the review page. #2241 (case 1) changes the
elsebranch of the sameifinHandleMovingto a horizontal-speed test; the two merge without conflict (trial merge of this branch, #2241 and #2240 checked). The torso part of case 4 (full run torso while sprinting) belongs to #2240.How this was compared
The code came first: neo's
HandleMovingagainst the 2006 base classic is built on, and classic'sclient.dllread for its leg rule (CalcMainActivity: 2D speed > 0.5 walks, > 175.0 runs, no sprint test). Then per-frame animation logs from both games (classic'scl_showanimstate_log, neo's harness log) on the same map (nt_rise_ctg), class and weapon (Jinrai Assault, MPN), with the same scripted keys, read by the same scripts. Then side-by-side clips. Numbers come from the logs, not from watching.How to test
Results
Scripted pass (
thirdpersonin neo; classic logs in first person, which it does not draw differently): (a) sprint key, then forward, from a stand; stop with the key held; (b) run, sprint, release sprint; (c) both keys together; (d) run, sprint, stop with the key held. Classic starts no sprint when the key is held before moving, so (a) and (c) are runs there. neo Release builds of master (f426c22) and this PR.Run_Uppershare; case 2)An earlier pass with longer sprints ended against walls: master played the sprint legs at 1 u/s for 2.7 s while the key was held against the wall; this PR, none.
Bots (10 on
ntre_rise_ctg, chase camera cycling through them, 120 s each): sprint-leg frames below 100 u/s: master 5 of 920, this PR 0 of 856. Bots also swap walk/sprint legs when they tap the sprint key, in both builds (master 20, this PR 36 quick swaps in 120 s; the live counts vary run to run with the bots' key use, the replay above isolates the threshold).Unchanged by construction: non-sprinting legs and crouching (the walk branch is untouched); checked on the pass: walk legs at run speed (136 u/s) before and after the sprint in both builds. A Debug client with 10 bots on
ntre_rise_ctg(90 s) logged only the knownneo_root.cpp (378) localizedWszStrat startup.Not changed: whether sprint should start from a stand (classic needs the key pressed while moving); the sprint legs still play at sprint speed only while the key is held, so a player released from sprint at 200 u/s shows the walk legs for the few frames of slowing down, as before.
GIF (master / this PR, side view, half speed: sprint from a stand, then stop with the key held; classic cannot be filmed here: it has no third-person view and its bots do not copy a mimicked sprint): case4-sprint-legs.gif