private void OnClientDirectIntroduction(ref MyEventDirectIntroductionResponse msg) { if (m_natIntroduction != null && msg.UserId != MyMultiplayerPeers.Static.HostUserId) { m_natIntroduction.OnDirectIntroduce(msg.UserId, MyMultiplayerPeers.Static.NetworkClient.GetRelayedConnection(msg.EndPoint)); MyMultiplayerGameplay.Log("JOIN 4.c - RELAYED, Directly introduced to " + msg.UserId + ", EP: " + msg.EndPoint); } UpdateLobby(); }
void OnHostDirectIntroduction(ref MyEventDirectIntroductionResponse msg) { MyMultiplayerPeers.Static.NetworkClient.NatIntroductionSuccess = NetworkClient_NatIntroductionSuccess; MyEventGetPlayerList getPlayersMsg = new MyEventGetPlayerList(); SetCallback <MyEventGetPlayerListResponse>(OnGetPlayerListResponse); var hostRelayConnection = MyMultiplayerPeers.Static.NetworkClient.GetRelayedConnection(msg.EndPoint); MyMultiplayerPeers.Static.NetworkClient.Send(ref getPlayersMsg, hostRelayConnection, NetDeliveryMethod.ReliableOrdered, 0); MyMultiplayerGameplay.Log("JOIN 3. - Host NAT introduction failure, RELAYING, sending player list request"); }