Merge BT411 audio-fidelity + combat work (4e72f0c..abed41e) into BT412

Brings the post-fork BT411 line forward via a local-path merge (never
touches the BT411 gitea remote): the full audio-fidelity system (engine
AUD*/L4AUD* + audiopresets.cpp + ~600 content wavs + AUDIO_FIDELITY.md),
missiles/rear-fire/HUD/gyro/gait tasks (#66-68), FOGDAY.EGG, and
refreshed context docs -- 91 commits, ~688 files clean.

Only 5 files overlapped the steamification; resolved keeping BOTH:
- L4NET.CPP: took BT411's task-#50 fix (don't close the game listener on
  console loss) over the seam's adaptation of the old buggy close; sends
  stay on NetTransport_Get().
- L4NETTRANSPORT.cpp: folded BT411's TCP_NODELAY latency fix into
  WinsockNetTransport::Connect (the seam already had retry + nonblocking).
- mechmppr.cpp: combined the device_owns_input gating with BT411's
  task-#68 look-behind, gating the lookBehind write too.
- .gitignore / CMakeLists.txt / mech4.cpp: trivial / auto-merged
  (deviceOwnsInput gating preserved).

Verified: clean build (default + implicitly the Steam TU untouched);
solo front-end mode; loopback MP through the seam (mesh completes, both
tick, replication works, no NODELAY warnings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-16 19:34:54 -05:00
co-authored by Claude Fable 5
696 changed files with 6416 additions and 422 deletions
+43 -8
View File
@@ -681,6 +681,31 @@ void
key_throttle = 0.08f; // near-idle half-cycle
}
}
// BT_FORCE_SWEEP=<period>: triangle-sweep the forced throttle 0.2..0.9
// continuously -- mimics a keyboard key-hold sweeping the lever every
// frame (a type-2 speed record per frame), the keyboard-skip repro.
{
static float s_swpP = -1.0f, s_swpClock = 0.0f;
if (s_swpP < 0.0f)
{
const char *fw = getenv("BT_FORCE_SWEEP");
s_swpP = fw ? (float)atof(fw) : 0.0f;
}
if (s_swpP > 0.0f)
{
s_swpClock += time_slice;
float ph = fmodf(s_swpClock, 2.0f * s_swpP) / s_swpP; // 0..2
float tri = (ph < 1.0f) ? ph : (2.0f - ph); // 0..1..0
key_throttle = 0.2f + 0.7f * tri;
// BT_FORCE_STEP=1: quantize the swept throttle to the RIO
// Ranger 0.05 grid (the authentic ADC/deadband step) -- the
// stepped-vs-continuous A/B for the speed-change glitch.
static int s_swpStep = -1;
if (s_swpStep < 0) s_swpStep = getenv("BT_FORCE_STEP") ? 1 : 0;
if (s_swpStep)
key_throttle = floorf(key_throttle / 0.05f + 0.5f) * 0.05f;
}
}
// BT_FORCE_FLIP=<t>: invert the forced throttle after t sim-seconds
// (the mid-stride direction-change repro).
static float s_hFlip = -1.0f;
@@ -706,6 +731,14 @@ void
{
throttlePosition = (key_throttle >= 0.0f) ? key_throttle : -key_throttle;
reverseThrust = (key_throttle < 0.0f) ? 1 : 0;
// (task #68) look-behind: hold 'V' = the pod's rear-view button.
// (The other look buttons stay unbound on the keyboard rig.)
// Gated with the throttle writes -- a live RIO device (PadRIO)
// feeds lookBehind through its own mapped rear-view button.
{
extern int gBTLookBehind;
lookBehind = gBTLookBehind;
}
}
// CONTROL-MODE AXIS ROUTING (2026-07-13, the pod mapping): in
// BASIC the stick steers the legs (turn) and the torso auto-
@@ -915,14 +948,16 @@ void
if (lookState != previousLookState)
{
// TODO(look-eyepoint): the commit block below writes the eyepoint pose at
// binary offsets whose Mech-member mapping is CONFLICTED (mech+0x360 is
// claimed by mechName, +0x410 by stateFlags, +0x7bc by weaponRoster --
// and the old draft even routed them through the TORSO pointer). Arbitrate
// those labels against the raw before enabling; the port has no eyepoint
// consumer yet. Look-state SELECTION above stays live (this-only).
DEBUG_STREAM << "[mppr] look state -> " << lookState
<< " (eyepoint commit deferred)\n" << std::flush;
// (task #68) the look commit is LIVE: the conflicted labels are
// arbitrated (mech+0x360 = EyepointRotation -- the eye renderable
// consumes it; +0x410 = RearFiring; the +0x7bc children = the WEAPON
// roster, not cameras). BTCommitLookState (mech4.cpp complete-type
// TU) re-aims the eyepoint and re-arms each weapon's viewFireEnable:
// forward view = the non-rear weapons, LOOK-BACK = the rear-mounted
// ones, side/down = none.
extern void BTCommitLookState(void *mech, int look_state);
BTCommitLookState((void *)mech, (int)lookState);
DEBUG_STREAM << "[mppr] look state -> " << lookState << "\n" << std::flush;
}
else if (0) // DEFERRED body (kept for the reconstruction record)
{