mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 19:07:47 -04:00
Lobby: honour transport "ice" launches (same-NAT peers no longer dial themselves)
The lobby server starts a 2-player room the host relay cannot carry on ICE (recomp-net-server start_transport, launch transport "ice"). This client knew only "host" and the legacy server relay. It inferred a relay from equal host/guest endpoints -- which is exactly what two peers behind one NAT advertise -- and each peer dialled its own public address: the match stayed at "linking" forever. - psx_lobby_launch_transport.h: one pure decision (host / ice / relay / direct) with a unit test covering ICE, same-NAT endpoints, host relay and the legacy relay cases. - PsxLobbyJoinInfo.transport_ice; the launch handler records it and never turns it into a relay; launch fill and resolve_use_ice start ICE p2p (signalled over the lobby) for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15236,13 +15236,14 @@ namespace {
|
||||
* §108's "always SFU"). Prefer caps.force_input_relay from the
|
||||
* relay_endpoint rewrite; also infer when host==guest advertise. */
|
||||
out->force_input_relay =
|
||||
(g_lnch_hosting_lan || g_lnch_joined_lan || ji->transport_host)
|
||||
(g_lnch_hosting_lan || g_lnch_joined_lan || ji->transport_host || ji->transport_ice)
|
||||
? 0
|
||||
: (caps->force_input_relay ? 1 : 0);
|
||||
#if defined(RECOMP_LAUNCHER_HAS_HOST_RELAY)
|
||||
out->transport_host = ji->transport_host ? 1 : 0;
|
||||
#endif
|
||||
if (!out->force_input_relay && !ji->transport_host && !g_lnch_hosting_lan &&
|
||||
if (!out->force_input_relay && !ji->transport_host && !ji->transport_ice &&
|
||||
!g_lnch_hosting_lan &&
|
||||
!g_lnch_joined_lan && ji->host_endpoint[0] &&
|
||||
ji->guest_endpoint[0] &&
|
||||
std::strcmp(ji->host_endpoint, ji->guest_endpoint) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user