diff --git a/ext/crlib/cr-http.h b/ext/crlib/cr-http.h index 7687b4c..ceb3c33 100644 --- a/ext/crlib/cr-http.h +++ b/ext/crlib/cr-http.h @@ -339,6 +339,7 @@ public: bool downloadFile (StringRef url, StringRef localPath, int32 timeout = DefaultSocketTimeout) { if (plat.win && !initialized_) { plat.abort ("Sockets not initialized."); + return false; } if (File::exists (localPath)) { @@ -409,6 +410,7 @@ public: bool uploadFile (StringRef url, StringRef localPath, const int32 timeout = DefaultSocketTimeout) { if (plat.win && !initialized_) { plat.abort ("Sockets not initialized."); + return false; } if (!File::exists (localPath)) { diff --git a/src/engine.cpp b/src/engine.cpp index 2ca103e..16a5995 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -799,6 +799,9 @@ bool Game::postload () { // set out user agent for http stuff http.setUserAgent (strings.format ("%s/%s", product.name, product.version)); + // startup the sockets on windows + http.startup (); + // startup the sockets http.startup (); diff --git a/src/graph.cpp b/src/graph.cpp index bc26c09..b33825e 100644 --- a/src/graph.cpp +++ b/src/graph.cpp @@ -2557,6 +2557,8 @@ bool BotGraph::checkNodes (bool teleportPlayer) { // perform DFS instead of floyd-warshall, this shit speedup this process in a bit PathWalk walk; + walk.init (m_paths.length ()); + Array visited; visited.resize (m_paths.length ());