From 593f53fc4745fcd2d763edeb61b184482f3f3222 Mon Sep 17 00:00:00 2001 From: Lev Date: Sun, 18 Aug 2024 13:23:31 +0300 Subject: [PATCH] fix minor ClientNetworkManager and ServerNetworkManager --- .../GameManagers/NetworkManager/ClientNetworkManager.cs | 4 ++-- .../GameManagers/NetworkManager/ServerNetworkManager.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ZoFo/GameCore/GameManagers/NetworkManager/ClientNetworkManager.cs b/ZoFo/GameCore/GameManagers/NetworkManager/ClientNetworkManager.cs index 2a93f71..70cfe76 100644 --- a/ZoFo/GameCore/GameManagers/NetworkManager/ClientNetworkManager.cs +++ b/ZoFo/GameCore/GameManagers/NetworkManager/ClientNetworkManager.cs @@ -98,8 +98,8 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager public static IPAddress GetIp() { string hostName = Dns.GetHostName(); // Retrive the Name of HOST - string myIP = Dns.GetHostByName(hostName).AddressList[1].ToString();// Get the IP - return IPAddress.Parse(myIP); + //string myIP = Dns.GetHostByName(hostName).AddressList[1].ToString();// Get the IP + return IPAddress.Parse("127.0.0.1"); } //поток 2 diff --git a/ZoFo/GameCore/GameManagers/NetworkManager/ServerNetworkManager.cs b/ZoFo/GameCore/GameManagers/NetworkManager/ServerNetworkManager.cs index 7b9501d..fedcac4 100644 --- a/ZoFo/GameCore/GameManagers/NetworkManager/ServerNetworkManager.cs +++ b/ZoFo/GameCore/GameManagers/NetworkManager/ServerNetworkManager.cs @@ -54,9 +54,9 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager public static IPAddress GetIp() { string hostName = Dns.GetHostName(); // Retrive the Name of HOST - var ipList =Dns.GetHostByName(hostName).AddressList; - string myIP = ipList[ipList.Count()-1].ToString();// Get the IP - return IPAddress.Parse(myIP); + //var ipList =Dns.GetHostByName(hostName).AddressList; + //string myIP = ipList[ipList.Count()-1].ToString();// Get the IP + return IPAddress.Parse("127.0.0.1"); } ///