#124 twist-sign VERIFIED correct (live missile bench) + the rig to do it

The frame-adapter's inferred twist-sign flip (SelectSlice theta -= twist,
vs the binary's += pre-reflection) was the last unverified half of #124 --
every earlier probe ran at twist 0.  Bench: stationary madcat target with
the torso PINNED at 0 / +140 / -140 deg, LRM salvos from a fixed shooter
(missiles = the authentic cylinder path; the binary DROPPED zone -1 beam
damage).  Result: slice picks track the physically-facing flank in BOTH
directions (twist-left -> right-family zones for left-flank impacts,
twist-right -> left-family), deterministic, wrong-sign outcome (slice 7
vs observed slice 1) clearly excluded.  No game-code change needed.

Instrumentation added (all env-gated):
- torso.cpp BT_FORCE_TWIST=<-1..1>: HOLD the sim's analogTwistAxis (the
  input-level pin was dead -- live input rides the CONTROLS.MAP device
  push, and Basic mode auto-centers; sim-level is plumbing-independent).
- dmgtable.cpp [slice] line: rot flag, live twist, thetaIn/thetaAdj,
  chosen slice -- the weighted leaf roll made zone-only logs ambiguous.
- [dmgresolve] now names the zone (BTMechZoneSegAndName).
- mech4.cpp BT_FORCE_TWIST input pin + one-shot mode cycle (kept as doc
  of the dead path), mechmppr [mppr] mode probe.
- scratchpad/night11/twistsign.sh: the 3-config bench.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Joe DiPrima
2026-08-04 15:49:14 -05:00
co-authored by Claude Fable 5
parent 952f10b18d
commit 1f995ee35a
5 changed files with 122 additions and 1 deletions
+17
View File
@@ -587,6 +587,23 @@ void
static int s_sweep = 0;
analogTwistAxis = ((++s_sweep / 90) & 1) ? -1.0f : 1.0f; // +/- every ~90 frames
}
// #124 twist-sign bench (BT_FORCE_TWIST=<-1..1>): HOLD the analog axis at a
// constant (the sweep above alternates) -- the sim integrates currentTwist
// to the per-mech limit and stays, giving the cylinder-table bench a known
// twist state at the SIM level, independent of the input plumbing.
{
static float s_forceTwist = -2.0f;
if (s_forceTwist < -1.5f)
{
const char *ft = getenv("BT_FORCE_TWIST");
s_forceTwist = ft ? (float)atof(ft) : -3.0f;
}
if (s_forceTwist >= -1.0f)
{
effectiveTwistRate = baseTwistRate;
analogTwistAxis = s_forceTwist;
}
}
// TORSO GATE PROBE (BT_TORSO_LOG): why is the twist rate zero?
if (getenv("BT_TORSO_LOG"))