#118: the eject option comes alive -- per-frame arm chain closed (FUN_004a9b5c+0x10)

The evaluator's "unexported caller" found by E8-scan: the Mech MASTER
PERFORMANCE (FUN_004a9b5c, in the 004a977x..004ab188 export hole) calls
EvaluateEjectPermission as its FIRST act every frame. Without that call the
port's ejectPermitted stayed at ctor-0 forever -- the panic-armed mode never
raised, so the PANIC lamp never lit and testers "never saw the option for
eject come alive". Restored at the top of Mech::PerformAndWatch (masters
only, like the binary).

Mislabel swept: mech+0x414 is ejectPermitted, NOT "missionReviewMode" -- the
mapper's @004d196c edge-watch arms PANIC mode 0x200000 from it (the real
review mode is the GLOBAL DAT_004fd550; btl4pb now reads that global, the
GetMissionReviewMode stub is retired, mapper member renamed
previousEjectPermitted).

Verified live: kill 4 generators -> "[eject] panic-arm mode ON" -> the
miniconsole Panic button lights dark->bright (pixel captures; the pad panel
shades it from the same PadRIO lamp state the pod's physical button uses) ->
BT_EJECT_AT press -> PUNCH-OUT -> respawn heals -> mode disarms -> healthy
presses REFUSED. BT_EJECT_LOG=1 logs the arm edges.

Note: no shipped gauge rides mode 0x200000 -- the 1995 eject indication is
the button lamp; the weapon-eng MFD "UNJAM/EJECT" is the ammo-jam indicator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Joe DiPrima
2026-08-03 13:53:09 -05:00
co-authored by Claude Fable 5
parent 440cee1e4f
commit 8165cee9da
7 changed files with 75 additions and 20 deletions
+12
View File
@@ -2466,6 +2466,18 @@ void
Scalar dt = till - lastPerformance;
lastPerformance = till;
// AUTHENTIC (byte-scan 2026-08-03): the binary's master performance
// (FUN_004a9b5c) CALLS the eject-permission evaluator (@0049fa1c) at
// +0x10 -- its first act every frame. The refreshed ejectPermitted
// (+0x414) is what L4MechControlsMapper::InterpretControls (@004d196c)
// edge-detects into the panic-armed mode 0x200000 (physical PANIC lamp
// via MakeLinkedLamp, eject-mode gauge elements, keypad routing). This
// call was the missing link in the port: without it the flag stayed at
// its ctor 0 forever and the eject option never came alive (#118).
// Masters only, like the binary (FUN_004a9b5c never runs on replicants).
if (GetInstance() == MasterInstance)
EvaluateEjectPermission();
// The bring-up DRIVE + ANIMATION path is single-player scaffolding: it reads
// the global gBTDrive and a single shared gBodyAnim, and integrates THIS body's
// origin. It must run ONLY for the local player's mech (the viewpoint entity);