#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
+28
View File
@@ -3384,6 +3384,34 @@ void
}
sPrevXT = xtNow;
gBTTwistAxis = sTwist;
// DIAG (BT_FORCE_TWIST=<-1..1>): pin the twist axis for
// the #124 twist-sign bench (the axis is a RATE demand,
// so a pinned axis slews the torso to its per-mech
// LIMIT and holds -- a known, stable twist state).
// Same pattern as BT_FORCE_ELEV below.
{
static float s_ft = -2.0f;
if (s_ft < -1.5f)
{
const char *ft = getenv("BT_FORCE_TWIST");
s_ft = ft ? (float)atof(ft) : -3.0f;
}
if (s_ft >= -1.0f)
{
gBTTwistAxis = s_ft;
// BASIC mode ignores the twist axis (the stick
// steers the legs; the torso auto-centers), so
// the pin also cycles the control mode ONCE:
// Basic -> Standard puts the mapper's twist
// branch in charge.
static int s_ftMode = 0;
if (!s_ftMode)
{
s_ftMode = 1;
gBTModeCycle = 1;
}
}
}
// TORSO ELEVATION (pitch aim -- the pod stick's Y
// axis; every 1995 control mode routes it to