Operator console: relay-mode local instances go through the JOIN menu

The Launch-local-instances path pinned BT_SELF, which claims a seat
directly and SKIPS the seat request -- the join menu (and the callsign/
mech choice it carries) never ran, so a local test instance couldn't
exercise the walk-up flow.  Relay-mode local instances now launch
zero-arg with BT_FE_JOIN=1: the JOIN-GAME menu opens, the relay assigns
the seat, and the choice lands in the egg like any join.bat player.
Each instance gets a distinct relaunch port via BT_FE_JOINPORT
(btl4main JoinRelay case; default 1501) -- two -net listeners can't
share a port on one box.  Mesh-mode locals keep the direct path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-22 14:14:19 -05:00
co-authored by Claude Opus 4.8
parent fcedc046cf
commit 95735db5ae
2 changed files with 24 additions and 8 deletions
+8 -2
View File
@@ -461,11 +461,17 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// BT_FE_JOIN (join.bat): the callsign/mech request rides env
// into the relaunched pod; L4NET's SEAT_REQUEST carries it to
// the relay, which writes it into the session egg. Args = the
// universal join contract (join.bat's own OPERATOR.EGG/1501).
// universal join contract (OPERATOR.EGG + port 1501); the
// operator console overrides the port per LOCAL instance via
// BT_FE_JOINPORT (two instances on one box can't share -net).
SetEnvironmentVariableA("BT_FE_EGG", NULL);
SetEnvironmentVariableA("BT_CALLSIGN", fe_spec.joinCallsign);
SetEnvironmentVariableA("BT_MECH", fe_spec.joinVehicle);
strcpy(fe_arguments, "-egg OPERATOR.EGG -net 1501 -platform glass");
{
const char *join_port = getenv("BT_FE_JOINPORT");
sprintf(fe_arguments, "-egg OPERATOR.EGG -net %d -platform glass",
join_port != NULL ? atoi(join_port) : 1501);
}
break;
#ifdef BT_STEAM
case BTFeLaunchJoinSteam: