Network cleanup, fixes #3953.

Don't compare for "127.0.0.1" to identify the host, but check for a new
boolean flag that is set by the client, refs #2854.
Remove an unneeded IP address conversion from u32 to string, refs #3241.

This was SVN commit r18140.
This commit is contained in:
elexis
2016-05-08 11:46:19 +00:00
parent cc3d7d58ea
commit 1a3fb29ff3
10 changed files with 64 additions and 48 deletions
+2 -2
View File
@@ -359,7 +359,7 @@ void StartNetworkHost(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring
}
g_Game = new CGame();
g_NetClient = new CNetClient(g_Game);
g_NetClient = new CNetClient(g_Game, true);
g_NetClient->SetUserName(playerName);
if (!g_NetClient->SetupConnection("127.0.0.1"))
@@ -377,7 +377,7 @@ void StartNetworkJoin(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring
ENSURE(!g_Game);
g_Game = new CGame();
g_NetClient = new CNetClient(g_Game);
g_NetClient = new CNetClient(g_Game, false);
g_NetClient->SetUserName(playerName);
if (!g_NetClient->SetupConnection(serverAddress))
{