gauge-complete P4a: heat-leaf data fixes (radar heat-degradation authentic)
The gauge-complete-decode workflow found the "deep heat-leaf byte-exact re-base" is STALE -- the leaf layout already shipped byte-exact (alarm-unification/P7), and the real work is a small misidentified-field data fix (highest value, lowest risk): - Sensor radarPercent read the INHERITED heatEnergy (~1.3e7) -> hugely negative -> needed a bring-up guard forcing it to 1.0. The binary (@004b1c4c:1829) reads *(this[0x38]+0x158) = the subsystem's OWN DamageZone::damageLevel [0,1] (0 intact .. 1 destroyed). Fixed: radarPercent = RadarBaseline - GetSubsystemDamageLevel(); guard DELETED (damageLevel is engine-clamped). So the radar authentically degrades with sensor structural damage (RadarBaseline-damage, x0.5 on DegradationHeat, 0 on Failure). - New databinding-SAFE accessor MechSubsystem::GetSubsystemDamageLevel()/Set... reads the ENGINE DamageZone::damageLevel NAMED member (NOT the ReconDamageZone proxy, whose offset-0 structureLevel aliases the vtable ptr as a float = garbage). - HeatSink::HandleMessage msg==1: same misidentification -> SetSubsystemDamageLevel(0.5) (was linkedSinks->heatEnergy=0.5, wrong object+field). - MyomerCluster seek lamp: subsys+0x800 (OOB for 0x358 Myomers) -> currentSeekVoltageIndex @0x320 (the Emitter+0x3f0 analog; INFERRED -- ctor not in the assert-anchored export). - numericSpeed (~225 vs 61.5): verified NOT A BUG (NumericDisplaySpeed applies x3.6; the feed is correct u/s) -- closed, no code. No layout change (already byte-exact); pure data-read retargets. Verified DBASE+dev gauges: no crash, combat un-regressed (TARGET DESTROYED). (radarPercent degrade is only OBSERVABLE once per-subsystem damage routes to each engine DamageZone -- a separate task; today the sensor is undamaged so radarPercent = full 1.0, which is correct.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
13f9c1f274
commit
12c4254aae
@@ -205,6 +205,27 @@ MechSubsystem::~MechSubsystem()
|
||||
Logical MechSubsystem::TestClass(Mech &) { return True; }
|
||||
Logical MechSubsystem::TestInstance() const { return IsDerivedFrom(ClassDerivations); }
|
||||
|
||||
//
|
||||
// gauge-complete wave: this subsystem's OWN structural damage level [0,1] (0=intact,
|
||||
// 1=destroyed). The zone at this+0xE0 is an ENGINE DamageZone (new DamageZone(this,0)
|
||||
// above); read/write its public NAMED damageLevel (DAMAGE.h) via the ENGINE type --
|
||||
// NOT the ReconDamageZone proxy (whose offset-0 structureLevel aliases the vtable ptr
|
||||
// as a float = garbage). The binary reads/writes *(this[0x38]+0x158) for exactly this
|
||||
// (SensorSimulation @004b1c4c, UpdateCoolant @004adbf8, HeatSink::HandleMessage @004add6c).
|
||||
//
|
||||
Scalar MechSubsystem::GetSubsystemDamageLevel() const
|
||||
{
|
||||
return damageZone ? ((DamageZone *)damageZone)->damageLevel : 0.0f;
|
||||
}
|
||||
|
||||
void MechSubsystem::SetSubsystemDamageLevel(Scalar level)
|
||||
{
|
||||
if (damageZone)
|
||||
{
|
||||
((DamageZone *)damageZone)->damageLevel = level;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//#############################################################################
|
||||
// Subsystem virtual overrides
|
||||
|
||||
Reference in New Issue
Block a user