mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
D310 (RULE-2-SIGNOFF, user-confirmed fixed): the uniform 1-byte AI_PRINT size broke level-local lists, which embed a NUL-terminated string after the PRINT byte (Caverns Trevelyan ran circles with glitched anims). chraiitemsize is back to byte-identical decomp; new PORT-only d310ItemSize() applies the 1-byte size only for lists confirmed global via chraiGetAIListID, used at ai()'s AI_PRINT step and chraiGoToLabel's label scan. Local-list behavior unchanged from the original. D311 (new, guarded): live freeze in Caverns diagnosed via GDB — Bond's own anim tick spun ~3.1e9 iterations in modelSetAnimFrame2WithChrStuff: animframe1 poisoned to -1.67e31 upstream, and the D156 guard validated only frameb, so 'frameb = framea' passed both garbage values through and floorFloatToInt saturated them to far-apart ints. Extend the guard to validate both framea/frameb (snap bad one to the valid other, else 0) and heal model->animframe1/2 before the fallback re-reads them. Same file/pattern as the accepted D156 guards, #ifdef PORT only. Upstream poison source (oldspeed=-1.75e18 at transition start; timespeed=0, unkb0=0) recorded open in the D311 entry. Post-fix Caverns playtest: guards dash-pause-resume, Trevelyan pathing normal, Caverns->intro clean. Probe log: global PRINTs size=1/global=1 (hit once each), local PRINTs NUL-scanned/valid landings, zero LABEL-NOT-FOUND, zero D156 fires, zero watchdog freezes.