fix(movement): remove unreferenced [0.25,3.0] clamp on local player's movSpd scale
CInstanceBase::SetMoveSpeed only guards moving_speed > 1100 -> 0; the local player's set_server_speed() was additionally floor/ceil-clamping the scale to an arbitrary [0.25, 3.0] band with no basis in the reference or in this project's already-fixed remote-entity equivalent (EntityStore::motion_move_speed). A heavy haste stack or slow debuff on the local player would silently diverge from what everyone else sees. Removed the extra clamp; kept the moving_speed<=0 early-return guard against pre-spawn/malformed values. audit: movement.keyboard.motion/server-speed-scale-clamp closed with reference citation, regression test, and full related-suite pass; contract stays PARTIAL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a4ac48db24
commit
c5c183da37
@@ -196,6 +196,23 @@ func _init() -> void:
|
||||
pc._input(_key(KEY_A, false))
|
||||
pc.stop()
|
||||
|
||||
# CInstanceBase::SetMoveSpeed(UINT uMovSpd) applies uMovSpd/100.0f with no
|
||||
# lower/upper clamp besides the >1100 -> 0 (frozen) guard; a haste stack or a
|
||||
# heavy slow debuff must scale local prediction exactly like it already
|
||||
# scales remote actors in EntityStore::motion_move_speed.
|
||||
pc.set_server_speed(10)
|
||||
_ck(is_equal_approx(pc.server_speed_scale, 0.1),
|
||||
"set_server_speed is unclamped below the old 0.25 floor")
|
||||
pc.set_server_speed(500)
|
||||
_ck(is_equal_approx(pc.server_speed_scale, 5.0),
|
||||
"set_server_speed is unclamped above the old 3.0 ceiling")
|
||||
pc.set_server_speed(1200)
|
||||
_ck(is_equal_approx(pc.server_speed_scale, 0.0),
|
||||
"set_server_speed freezes to 0 past the 1100 SetMoveSpeed guard")
|
||||
pc.set_server_speed(100)
|
||||
_ck(is_equal_approx(pc.server_speed_scale, 1.0),
|
||||
"set_server_speed keeps the 100 baseline at scale 1.0")
|
||||
|
||||
player.free()
|
||||
pc.free()
|
||||
cam.free()
|
||||
|
||||
Reference in New Issue
Block a user