Advertisement
Guest User

Untitled

a guest
May 1st, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.06 KB | None | 0 0
  1. Index: source/gui/scripting/ScriptFunctions.cpp
  2. ===================================================================
  3. --- source/gui/scripting/ScriptFunctions.cpp    (revision 18117)
  4. +++ source/gui/scripting/ScriptFunctions.cpp    (working copy)
  5. @@ -347,48 +347,51 @@ void SetNetworkGameAttributes(ScriptInte
  6.  void StartNetworkHost(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring& playerName)
  7.  {
  8.     ENSURE(!g_NetClient);
  9.     ENSURE(!g_NetServer);
  10.     ENSURE(!g_Game);
  11.  
  12.     g_NetServer = new CNetServer();
  13.     if (!g_NetServer->SetupConnection())
  14.     {
  15.         pCxPrivate->pScriptInterface->ReportError("Failed to start server");
  16.         SAFE_DELETE(g_NetServer);
  17.         return;
  18.     }
  19.  
  20.     g_Game = new CGame();
  21.     g_NetClient = new CNetClient(g_Game);
  22.     g_NetClient->SetUserName(playerName);
  23.  
  24.     if (!g_NetClient->SetupConnection("127.0.0.1"))
  25.     {
  26.         pCxPrivate->pScriptInterface->ReportError("Failed to connect to server");
  27.         SAFE_DELETE(g_NetClient);
  28.         SAFE_DELETE(g_Game);
  29.     }
  30. +
  31. +   g_NetClient->DisableTimeout();
  32. +   g_NetServer->DisableTimeout(g_NetClient->GetGUID());
  33.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement