Skip to content

Commit

Permalink
Fix to ip address function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimo-s committed Apr 10, 2022
1 parent 171950f commit 49e3967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/scripts/PlayerControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public void updateLocation(Vector3 changeposition, GameObject thegameobject, bo
public void GetLocalIPv4()
{
string externalIpString = new WebClient().DownloadString("http://icanhazip.com").Replace("\\r\\n", "").Replace("\\n", "").Trim();
var externalIp = IPAddress.Parse(serverIPaddress);
var externalIp = IPAddress.Parse(externalIpString);
serverIPaddress = externalIp.ToString();

port = NetworkManager.singleton.GetComponent<kcp2k.KcpTransport>().Port;
Expand Down

0 comments on commit 49e3967

Please sign in to comment.