diff --git a/engine/MUNGA_L4/L4NET.CPP b/engine/MUNGA_L4/L4NET.CPP index c7058f1..de6b4b7 100644 --- a/engine/MUNGA_L4/L4NET.CPP +++ b/engine/MUNGA_L4/L4NET.CPP @@ -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"); } diff --git a/players/join.bat b/players/join.bat index be7e127..c18bed1 100644 --- a/players/join.bat +++ b/players/join.bat @@ -4,3 +4,8 @@ rem is assigned automatically by the operator console. set BT_RELAY=107.202.218.169:1500 cd /d %~dp0content ..\build\Release\btl4.exe -egg OPERATOR.EGG -net 1501 +echo. +echo The game has exited. If you did NOT quit on purpose, +echo the session may not be running yet or the server was +echo unreachable -- check with the operator and try again. +pause diff --git a/players/join_lan.bat b/players/join_lan.bat index 6e4aab8..16f2c84 100644 --- a/players/join_lan.bat +++ b/players/join_lan.bat @@ -1,6 +1,12 @@ @echo off -rem BT411 -- join the LAN game. Finds the operator -rem console AND your seat automatically. +rem BT411 -- join the game from the operator's OWN +rem network (LAN) -- finds the console automatically. +rem Joining over the INTERNET? Use join.bat instead. set BT_RELAY=auto cd /d %~dp0content ..\build\Release\btl4.exe -egg OPERATOR.EGG -net 1501 +echo. +echo The game has exited. If you did NOT quit on purpose, +echo the session may not be running yet or the server was +echo unreachable -- check with the operator and try again. +pause diff --git a/tools/btoperator.py b/tools/btoperator.py index 255f2cf..d7a1517 100644 --- a/tools/btoperator.py +++ b/tools/btoperator.py @@ -706,6 +706,11 @@ class Operator(QMainWindow): # first-come-first-served (no BT_SELF), so every player gets the SAME # file -- who flies which mech is whoever sits down first, exactly # like walking up to a pod. + tail = ("echo.\n" + "echo The game has exited. If you did NOT quit on purpose,\n" + "echo the session may not be running yet or the server was\n" + "echo unreachable -- check with the operator and try again.\n" + "pause\n") with open(os.path.join(out_dir, "join.bat"), "w", newline="\r\n") as f: f.write("@echo off\n" "rem BT411 -- join %s's game (internet). Your seat/mech\n" @@ -713,16 +718,17 @@ class Operator(QMainWindow): "set BT_RELAY=%s:%d\n" "cd /d %%~dp0content\n" "..\\build\\Release\\btl4.exe -egg %s -net 1501\n" - % (host, host, self.f_port.value(), egg_name)) + % (host, host, self.f_port.value(), egg_name) + tail) with open(os.path.join(out_dir, "join_lan.bat"), "w", newline="\r\n") as f: f.write("@echo off\n" - "rem BT411 -- join the LAN game. Finds the operator\n" - "rem console AND your seat automatically.\n" + "rem BT411 -- join the game from the operator's OWN\n" + "rem network (LAN) -- finds the console automatically.\n" + "rem Joining over the INTERNET? Use join.bat instead.\n" "set BT_RELAY=auto\n" "cd /d %%~dp0content\n" "..\\build\\Release\\btl4.exe -egg %s -net 1501\n" - % egg_name) + % egg_name + tail) self.log.appendPlainText( "exported join.bat + join_lan.bat to %s (public host: %s) -- " "one file for everyone; the relay assigns seats"