Steam: the lobby + IDENTITY-TOKEN roster -- internet MP code-complete (step 4c)
NEW gated (BT_STEAM) game/glass/btl4lobby: an ISteamMatchmaking room replacing the arcade Site-Management screen -- host creates (lobby data btl4=1), members join by filter, pilots publish name/mech/color, the host ENTER mints the roster and signals GO. THE FAKEIP LESSON (live-verified, prior-art assumption DISPROVEN): a fresh process gets a DIFFERENT FakeIP, so menu-time fake addresses go stale by mission time -- the first cycle timed out connecting to its own stale address. Redesign: roster addresses are opaque ipv4-shaped TOKENS (169.254.77.N with ports 1501/1502) minted by the host at GO, mapped to Steam IDENTITIES; connections ride ConnectP2P(identity, channel) with console=0/game=1 virtual ports; the map reaches mission processes via env (BT_FE_MYFAKE + BT_FE_STEAMMAP); the GetMyAddress seam feeds the pod its own token for roster self-match; CheckSocket reports peers by token. L4STEAMNET reworked (no FakeIP allocation at all); the marshal gained the Steam-wire branch. Verified single-machine (ON/ON, live Steam): menu -> HOST STEAM LOBBY -> room -> GO -> token map minted -> egg roster carries the token -> mission process up with 1 roster token incl. self -> pod self-matches -> stock console ladder -> mission RUNS (46 ticks). Remaining: the live 2-account cross-machine session (docs/STEAM_TEST.md). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2682,14 +2682,30 @@ NetworkAddress* L4NetworkManager::GetMyAddress()
|
||||
|
||||
// count how many addresses we have
|
||||
for (num_addresses = 0; hostinfo->h_addr_list[num_addresses]; num_addresses++);
|
||||
|
||||
NetworkAddress* myAddresses = new NetworkAddress[num_addresses + 1];
|
||||
|
||||
// (+2: the 127.0.0.1 slot, plus the Steam FakeIP slot when active)
|
||||
NetworkAddress* myAddresses = new NetworkAddress[num_addresses + 2];
|
||||
for (int i=0; i<num_addresses; i++)
|
||||
myAddresses[i] = *((NetworkAddress*)hostinfo->h_addr_list[i]);
|
||||
|
||||
// add 127.0.0.1 to list
|
||||
myAddresses[num_addresses++] = (NetworkAddress)0x0100007F;
|
||||
|
||||
|
||||
#ifdef BT_STEAM
|
||||
//
|
||||
// The pod's own Steam FakeIP is also "me": a lobby-built egg's
|
||||
// [pilots] roster carries FAKE addresses, and the self-identification
|
||||
// walk matches the roster against this list.
|
||||
//
|
||||
{
|
||||
unsigned long fake_address_be = 0;
|
||||
if (BTSteamNet_GetFakeAddressRaw(&fake_address_be) == 0)
|
||||
{
|
||||
myAddresses[num_addresses++] = (NetworkAddress)fake_address_be;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return myAddresses;
|
||||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user