Combat: THE AUTHENTIC DAMAGE ECONOMY -- authored per-weapon amounts through the real fire chain (task #8)

Three root causes, all fixed:
1. kDamageScale was 1.0 -- _DAT_004bafbc is an x87 float80 = 1e-7, cancelling
   the ctor's x1e7: damagePortion = authored DamageAmount x (charge/seekV)^2
   (closed form at fire time; madcat AC=25/LRM=50/ERLL=6, bhk1 PPC=12/SRM=35).
   The observed "0.25" was the degenerate EC=1 fallback, never authored data.
2. CheckFireEdge NaN latch: TriggerState carries ControlsButton INTS; the
   release value (-65) is a negative NaN.  The binary's x87 unordered compare
   read it as "released"; IEEE-correct float compares latched the edge
   detector shut after the first release -- the reason the emitter discharge
   chain NEVER fired in-game.  Fixed with bit-pattern sign compares.
3. The weapon-side submission LIVE: Emitter::FireWeapon fills damageData
   (amount + damageForce=target-muzzle [the gyro directional-bounce feed] +
   impact) -> MechWeapon::SendDamageMessage (@004b9728 real body) ->
   messmgr consolidation with per-weapon records + explosion bundling.
   The mech4 bring-up damage block + flat kShotDamage retired to diag hooks.
Bonus: LODReuseHysteresis 0.82 -> 0.33 (double misread).  Zone model
verified byte-exact (no change).  Solo end-to-end: 5-record volleys (2 PPC
+ 3 ERML with authored amounts), per-weapon zone granularity, explosions,
kill.  Heat stays bring-up scale pending the heat-calibration audit [T3].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-11 15:32:24 -05:00
co-authored by Claude Fable 5
parent 77190c93e5
commit fd055281a8
17 changed files with 654 additions and 75 deletions
+13
View File
@@ -123,17 +123,30 @@ void
ControlsInstance
*controls_instance;
int walked = 0, matched = 0; // BT diag (task #8)
while ((controls_instance=i.ReadAndNext()) != NULL)
{
//------------------------------------------------
// Process only if at least one mode bit matches
//------------------------------------------------
Check(controls_instance);
++walked;
if (controls_instance->modeMask & mode_mask)
{
++matched;
controls_instance->Update(data_source);
}
}
// BT diag (task #8): trace the fire-button delivery counts.
if (getenv("BT_FIRE_LOG"))
{
static int s_gwalk = 0;
if ((++s_gwalk % 40) == 1)
DEBUG_STREAM << "[group-upd] grp=" << (void *)this
<< " walked=" << walked << " matched=" << matched
<< " mode=0x" << std::hex << (int)mode_mask << std::dec
<< std::endl;
}
Check_Fpu();
}