Unreachable-server UX: message boxes + bat guidance instead of a 'crash'

Field report (first internet-join attempt): both join bats 'hard
crash' on the remote machine.  Root cause was procedural -- the host
session was not running -- but the failure PRESENTATION was the bug:
Release Fail() is a bare abort(), so a dead relay = silent process
death + instantly-closing console window.

- L4NET: the two player-facing dead-ends (LAN discovery no-answer,
  seat request unreachable/full) now show a MessageBox saying what
  happened and what to do before exiting (verified live against a
  dead relay: 'BattleTech -- can't join the game' appears).
- join bats: echo + pause after exit so the window stays readable;
  join_lan.bat header now says it is LAN-only (the remote user ran
  both -- join_lan can never work over the internet).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-18 14:23:29 -05:00
co-authored by Claude Fable 5
parent d173f088a6
commit dfd1894fb9
4 changed files with 46 additions and 6 deletions
+23
View File
@@ -354,6 +354,17 @@ L4NetworkManager::L4NetworkManager():
//
if (!RelayDiscover(&relayConsoleAddress))
{
// Release Fail() is a bare abort() -- without this box a
// player just sees a "crash" (field report 2026-07-18)
MessageBoxA(NULL,
"No game server answered on this network.\n\n"
"join_lan.bat only works on the SAME network as the\n"
"operator's machine. Joining over the internet?\n"
"Use join.bat instead.\n\n"
"On the operator's own network: make sure the\n"
"operator has pressed Start Session, then try again.",
"BattleTech -- can't find the game server",
MB_OK | MB_ICONERROR);
Fail("BT_RELAY=auto: no relay answered on this LAN\n");
}
}
@@ -402,6 +413,18 @@ L4NetworkManager::L4NetworkManager():
{
if (!RelayRequestSeat())
{
char seat_error[256];
sprintf(seat_error,
"Could not join the game at %s:%d.\n\n"
"Either the operator has not started the session\n"
"yet, the game is full, or the server is not\n"
"reachable from here.\n\n"
"Check with the operator and run join.bat again.",
inet_ntoa(relayConsoleAddress.sin_addr),
(int)ntohs(relayConsoleAddress.sin_port));
MessageBoxA(NULL, seat_error,
"BattleTech -- can't join the game",
MB_OK | MB_ICONERROR);
Fail("relay seat request failed (roster full or relay "
"unreachable)\n");
}