subsystems: un-stub Wave 4 readouts + Wave 6 Myomers (10->15 factory cases)

WAVE 4 (standalone readouts) -- Sensor(0xBC3)/Searchlight(0xBD8)/
ThermalSight(0xBDE)/AmmoBin(0xBCB) un-stubbed via Create<Class>Subsystem
bridges + Torso-style de-shim (drop cross-family shadow fields, redirect
accessors to the real inherited base, static_assert layout locks).
- FIX: Searchlight/ThermalSight ctors gated their Performance on the shadow
  segmentFlags(=0) so it NEVER installed; switched to owner->simulationFlags.
- AmmoBin: retype ammoAlarm HeatAlarm->WatcherGaugeAlarm(0x54) + drop the
  statusState@0x40 shadow -> exact 0x22C layout.
- Guard HeatWatcher::WatchSimulation against the unresolved watchedLink
  (null-deref exposed once these sims run; faithful fix = resolve the link).
- Heat-leaf branch (Sensor) is not byte-exact -> overflow-lock only.

WAVE 6 (Myomers 0xBC6, mover-coupled) -- structural un-stub, gated
BT_MYOMERS (default on; =0 -> Actuator stub). Wired INERT: MyomersSimulation
early-returns (advanced-damage gate stubbed) + no-op mover feed, so the live
JointedMover is untouched and the gait cannot regress. De-shim drops the
owner*/segmentFlags shims to fit the exact-0x358 alloc. Authentic mover/heat
coupling deferred (needs messmgr 0xBD3 + reconciling the mover feed with the
gait cutover).

Verified: BLH tick 20->27, Mad Cat 24, combat DESTROYED un-regressed,
locomotion un-regressed, 0 crashes, 0 heap detections under BT_HEAPCHECK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-05 23:01:31 -05:00
co-authored by Claude Opus 4.8
parent 5aa791b245
commit 8b36440d05
14 changed files with 421 additions and 141 deletions
+16 -13
View File
@@ -111,24 +111,27 @@
};
#endif
public:
Word
GetSegmentFlags() const { return segmentFlags; }
// De-shimmed (WAVE 4 un-stub): the 5 CROSS-FAMILY backing fields
// (segmentFlags/hasActivePerformance/heatStateLevel/heatModelOff/
// electricalState) are DELETED -- they over-sized the object past its
// zero-headroom 0x328 factory alloc AND duplicated engine-base state.
// The accessors now read the REAL inherited base members:
// HeatStateLevel <- HeatSink::heatAlarm level (this+0x170)
// ElectricalState <- PoweredSubsystem::electricalStateAlarm level (this+0x278)
// HeatModelOff <- MechSubsystem::simulationState == Destroyed (this+0x40)
// HeatMasterEnergy <- inherited HeatSink::heatEnergy (this+0x158)
// SetHasPerformanceFlag -> engine Simulation::simulationFlags |= 8 (this+0x28)
// GetSegmentFlags() removed (unused; the ctor gate reads owner->simulationFlags).
HeatSink::HeatState
HeatStateLevel() const { return heatStateLevel; }
HeatStateLevel() const { return (HeatSink::HeatState)heatAlarm.GetLevel(); }
Logical
HeatModelOff() const { return heatModelOff; }
HeatModelOff() const { return simulationState == 1; /* MechSubsystem::DestroyedState */ }
Scalar
HeatMasterEnergy() const { return heatEnergy; } // own inherited sink
HeatMasterEnergy() const { return heatEnergy; } // inherited HeatSink sink
PoweredSubsystem::ElectricalState
ElectricalStateLevel() const { return electricalState; }
ElectricalStateLevel() const { return (PoweredSubsystem::ElectricalState)electricalStateAlarm.GetLevel(); }
void
SetHasPerformanceFlag() { hasActivePerformance = True; }
protected:
Word segmentFlags; // @this[0x28]/segment flags (Mech-supplied)
Logical hasActivePerformance;
HeatSink::HeatState heatStateLevel; // heatAlarm level (cross-family base)
Logical heatModelOff; // thermal model disabled flag
PoweredSubsystem::ElectricalState electricalState; // electricalStateAlarm level
SetHasPerformanceFlag() { simulationFlags |= 8; } // engine Simulation flag bit 3
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Attribute Support