Merge pull request #1194: a charged attack that hits no longer crashes above 60 fps when the weapon's hit record map is full (project-snail)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-15 09:12:55 +03:00
commit db26ab1abb
1 file changed
+10
+10
View File
@@ -49,6 +49,16 @@ site realtime main 2daa78 1e210800 d503201f # fmul s0, s0, s1 -> nop
# keeps equipment locked until a load. Stepping while above 0 takes the remainder below 0 like any other last step.
site realtime main 2b036c 0f016681 0f000401 # movi v1.2s, #0x34, lsl #24 (FLT_EPSILON) -> movi v1.2s, #0
# Attack hit processing (main+0x2906a24) builds a list of this frame's hit records on its stack (count at [sp], slots
# at [sp+8] -> an inline array that is never cleared). The record insert (main+0x86e1d8) returns null when the
# attacker's record map (+0x190) is full, so a full map leaves the list empty. After its two loops the function
# passes slot 0 to the hit handler (main+0x870158, which dereferences it) unconditionally at main+0x2906de0 and only
# then checks count == 0 at main+0x2906df0; with an empty list slot 0 is stale stack data and the handler faults.
# Charged spear hits above 60 fps fill the map. Both count == 0 branches go to the check instead, which reloads the
# count and leaves through main+0x2906ce8; x19 and x20 are the only registers read there. A non-empty list is unchanged.
site realtime main 2906d98 34000248 340002c8 # cbz w8, 0x2906de0 -> 0x2906df0 (first loop's empty check)
site realtime main 2906dc0 34000108 34000188 # cbz w8, 0x2906de0 -> 0x2906df0 (second loop's empty check)
# Hair and cloth: the actor animation update builds a second clock {seconds = factor / 30, ratio = factor} per
# rendered frame. 1.4.3 inlines it in two actor paths, where the factor was just stored to the ratio slot: the
# replacement stores measured ratio * factor there and computes measured seconds * factor. Two other callers share the