mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-02 04:46:40 +00:00
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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user