From c4d28025183e7dff6d2af2652c07e9fb5902bdba Mon Sep 17 00:00:00 2001 From: trippyone <137233897+trippyone@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:03:11 -0400 Subject: [PATCH] punch nat response handling --- Fika.Core/Networking/FikaPingingClient.cs | 2 +- Fika.Core/Networking/NatPunch/NatPunchUtils.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Fika.Core/Networking/FikaPingingClient.cs b/Fika.Core/Networking/FikaPingingClient.cs index 02219563..81b1b564 100644 --- a/Fika.Core/Networking/FikaPingingClient.cs +++ b/Fika.Core/Networking/FikaPingingClient.cs @@ -127,7 +127,7 @@ public void OnNetworkReceiveUnconnected(IPEndPoint remoteEndPoint, NetPacketRead if (reader.TryGetString(out string result)) { - if (result == "fika.hello") + if (result == "fika.hello" || result == "fika.punchnat") { Received = true; MatchmakerAcceptPatches.RemoteIp = remoteEndPoint.Address.ToString(); diff --git a/Fika.Core/Networking/NatPunch/NatPunchUtils.cs b/Fika.Core/Networking/NatPunch/NatPunchUtils.cs index 8ec53813..eb4cf972 100644 --- a/Fika.Core/Networking/NatPunch/NatPunchUtils.cs +++ b/Fika.Core/Networking/NatPunch/NatPunchUtils.cs @@ -64,7 +64,7 @@ public static void PunchNat(NetManager netManager, IPEndPoint endPoint) { // bogus punch data var resp = new NetDataWriter(); - resp.Put(9999); + resp.Put("fika.punchnat"); // send a couple of packets to punch a hole for (int i = 0; i < 10; i++)