Auto-attack: bow shots chain at full speed, arts start by their cooldown; hang watchdog

- The shot end's button check (0x4def52) answers "held" for the auto-attack
  target, like the melee swing end.
- An art order counts as started when the art's cooldown rises, so bow arts
  and arts ordered mid-swing hand over to auto-attack.
- re/crash.cpp: a watchdog writes sacred_re_hang.dmp when the engine tick
  stops for 10 s while the game is in front.

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:29:29 +02:00
1 parent 432cac2ccf
commit 184c7058fd
6 files changed
+125 -13

No files matched your search

+25
View File
@@ -85,3 +85,28 @@ Rules (`autoattack.cpp`):
nearest enemy close by. Ranged: the same with a ranged weapon; with a melee
weapon only an enemy already in close range (the art's target if it is,
else the nearest), otherwise auto-attack stops. Until the art starts, no attack orders are sent.
## Bow speed and arts that start differently (2026-10-18)
User: auto-attack after spells not fully reliable; with a ranged weapon it
does not reach full speed; bow arts (Spinnenpfeil) do not start it.
Measured (order log + a log of every `cMouseCursor::IsButtonHeld` caller):
- A shot with a bow is action 5. Before the next shot the game checks the
button at `0x4def52` (shooter esi, target creature edi): held and the target
hostile -> it shoots again. A held button fired 2 s without new orders;
auto-attack sent one order per 0.67 s. `0x4def89` right after retargets to
the creature under the cursor when held.
- Several arts (0x42f, 0x3ee) never showed action 4 or 8, so the cast watch
waited its 5 s and auto-attack stopped. Arts ordered during a swing or cast
were taken as started by that action.
Now:
- `0x4def52` is redirected like the melee swing end (`SwingContinues`):
"held" for the auto-attack target. `0x4def89` is left alone.
- An art counts as started when its cooldown rises (`GetArtCooldown`
remaining above the value at the order, which follows regeneration). Arts
without a cooldown entry: the hero went into a new action other than
walking or idle.