fix(motion): #39 — use SidestepAnimSpeed (1.25) as sidestep mapping base
Fix #4 (commit cc62e1c) divided the observed horizSpeed by WalkAnimSpeed
(3.12 m/s) when computing the sidestep speedMod. That made slow strafe
come out 2.5× too slow because retail's sidestep cycle uses
SidestepAnimSpeed (1.25 m/s) — a smaller base — per
MotionInterpreter.cs:592 `velocity.X = SidestepAnimSpeed * SideStepSpeed`.
User report: "Strafe left and right slowly now is SUPER slow :)".
Replace MotionInterpreter.WalkAnimSpeed with MotionInterpreter.SidestepAnimSpeed
in the sidestep branch only. Forward / backward branches continue using
WalkAnimSpeed (correct for those motions).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc62e1cfde
commit
349ba65f3e
1 changed files with 8 additions and 6 deletions
|
|
@ -3491,12 +3491,14 @@ public sealed class GameWindow : IDisposable
|
|||
// velocity here. Preserve the sign — SideStepLeft is sometimes
|
||||
// emitted with negative speedMod by the adjust_motion path.
|
||||
//
|
||||
// Magnitude: horizSpeed / WalkAnimSpeed maps the observed speed
|
||||
// back to a speedMod the sequencer can apply as a framerate
|
||||
// multiplier. WalkAnimSpeed is the reasonable base because
|
||||
// sidestep cycles use the WalkAnim equivalent (no separate
|
||||
// RunSidestep cycle in the dat).
|
||||
float sideMag = horizSpeed / AcDream.Core.Physics.MotionInterpreter.WalkAnimSpeed;
|
||||
// Magnitude: horizSpeed / SidestepAnimSpeed maps the observed
|
||||
// speed back to a SideStepSpeed the sequencer can apply as a
|
||||
// framerate multiplier. Retail's get_state_velocity for
|
||||
// sidestep cycles is `velocity.X = SidestepAnimSpeed *
|
||||
// SideStepSpeed` (MotionInterpreter.cs:592 — constant 1.25
|
||||
// m/s). Dividing by WalkAnimSpeed (3.12) here was wrong by
|
||||
// 2.5× and made slow strafe play visibly slower than retail.
|
||||
float sideMag = horizSpeed / AcDream.Core.Physics.MotionInterpreter.SidestepAnimSpeed;
|
||||
sideMag = MathF.Min(MathF.Max(
|
||||
sideMag,
|
||||
AcDream.Core.Physics.ServerControlledLocomotion.MinSpeedMod),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue