WASD: resume the walk right after a weapon set switch (untested in-game)

Switching between weapon classes resets the hero's animation state inside
cUI_Taskbar2::SelectWeaponSet, which dropped the walk for a tick. The hook
sends the WASD walk again at once. Checkpoint before the movement rework.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-18 01:41:13 +02:00
1 parent 184c7058fd
commit d296e2850b
4 files changed
+79 -12

No files matched your search

+15
View File
@@ -79,3 +79,18 @@ Now (`src/mods/input.cpp`, `FocusedTextField`): keys pass to the game while the
focused control is a writable edit control that `cUI_EditControl::Render`
(0x737ae0, thiscall (renderer), ret 4, returns at once while hidden) drew in
the last 250 ms. The render hook only notes the focused control.
## Weapon set switch while walking (2026-10-18)
Request: the hero stops for a moment when switching weapon sets (F-keys)
while walking with WASD.
Measured (state per tick + orders): `cUI_Taskbar2::SelectWeaponSet`
(`0x6e1440`, ret 8) sends order 0x114 (set, items) and 0x107; between melee
sets the walk goes on, between a melee and a bow set the hero drops to idle
for one tick: the weapon class changed, and the switch resets the hero's
animation state (`0x54e540(1, 0)`). The next WASD tick restarts the walk.
Now: `SelectWeaponSet` is hooked (`skillbar.cpp`) and calls
`mods::wasd::ResumeWalk`, which sends the walk for the held keys at once.
Not yet confirmed in-game.