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
+20 -2
View File
@@ -970,8 +970,17 @@ void L4NetworkManager::HostDisconnectedMessageHandler(HostDisconnectedMessage* H
//
// Post a listen for a console so it can reconnect if it wants to.
//
NetTransport_Get()->Close(gameListenerSocket);
gameListenerSocket = NULL;
// FIX (task #50, 2026-07-15): this used to close the GAME listener here
// (shutdown/closesocket(gameListenerSocket)) on a CONSOLE disconnect -- a
// naming bug: the comment above + the commented-out OpenConnection below
// intended to re-post a CONSOLE listen, which CreateConsoleHost() (below)
// already does. Closing the game listener on console loss needlessly
// bounced the game-accept path (harmless to already-established peer
// sockets -- which is why a live 2-node match keeps replicating through a
// console loss -- but wrong, and it would have blocked a NEW peer from
// joining after a console cycle). Removed; CreateConsoleHost re-listens.
// (BT412: the NetTransport seam close that briefly lived here is dropped
// with the bug it wrapped.)
//unsigned long console_socket = OpenConnection(
// NETNUB_TCP_LISTEN,
// ((L4Application *)application)->GetNetworkCommonFlatAddress(), // Local port
@@ -2138,6 +2147,12 @@ Logical L4NetworkManager::CheckBuffers(NetworkPacket *network_packet)
{
continue;
}
// TCP_NODELAY on the accepted GAME socket (not the console):
// without it Nagle coalesces the inbound per-frame update
// records into bursts -> the peer is received in lurches.
BOOL gameNoDelay = TRUE;
if (setsockopt(tempSocket, IPPROTO_TCP, TCP_NODELAY, (char*)&gameNoDelay, sizeof(gameNoDelay)))
DEBUG_STREAM << "WARN: could not set TCP_NODELAY on accepted game socket; setsockopt() failed with " << WSAGetLastError() << "\n" << std::flush;
}
remote_host->SetNetworkSocket(tempSocket);
@@ -2683,6 +2698,9 @@ SOCKET L4NetworkManager::OpenConnection(
remoteEndpoint.sin_addr.S_un.S_addr = internet_address;
remoteEndpoint.sin_port = htons(remote_port);
// BT412: the raw connect/retry/nonblocking/TCP_NODELAY sequence that
// lived here now lives in WinsockNetTransport::Connect (the seam) --
// including BT411's task-#50 TCP_NODELAY latency fix, folded in there.
return (SOCKET) NetTransport_Get()->Connect(&remoteEndpoint, local_port);
}
else if(connection_type == NETNUB_TCP_LISTEN)