Fix uninitialized path walker in waypoints checker.
Update to latest crlib.
This commit is contained in:
parent
d632ee9bb3
commit
4c8a4175d8
3 changed files with 7 additions and 0 deletions
|
|
@ -339,6 +339,7 @@ public:
|
||||||
bool downloadFile (StringRef url, StringRef localPath, int32 timeout = DefaultSocketTimeout) {
|
bool downloadFile (StringRef url, StringRef localPath, int32 timeout = DefaultSocketTimeout) {
|
||||||
if (plat.win && !initialized_) {
|
if (plat.win && !initialized_) {
|
||||||
plat.abort ("Sockets not initialized.");
|
plat.abort ("Sockets not initialized.");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File::exists (localPath)) {
|
if (File::exists (localPath)) {
|
||||||
|
|
@ -409,6 +410,7 @@ public:
|
||||||
bool uploadFile (StringRef url, StringRef localPath, const int32 timeout = DefaultSocketTimeout) {
|
bool uploadFile (StringRef url, StringRef localPath, const int32 timeout = DefaultSocketTimeout) {
|
||||||
if (plat.win && !initialized_) {
|
if (plat.win && !initialized_) {
|
||||||
plat.abort ("Sockets not initialized.");
|
plat.abort ("Sockets not initialized.");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File::exists (localPath)) {
|
if (!File::exists (localPath)) {
|
||||||
|
|
|
||||||
|
|
@ -799,6 +799,9 @@ bool Game::postload () {
|
||||||
// set out user agent for http stuff
|
// set out user agent for http stuff
|
||||||
http.setUserAgent (strings.format ("%s/%s", product.name, product.version));
|
http.setUserAgent (strings.format ("%s/%s", product.name, product.version));
|
||||||
|
|
||||||
|
// startup the sockets on windows
|
||||||
|
http.startup ();
|
||||||
|
|
||||||
// startup the sockets
|
// startup the sockets
|
||||||
http.startup ();
|
http.startup ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2557,6 +2557,8 @@ bool BotGraph::checkNodes (bool teleportPlayer) {
|
||||||
|
|
||||||
// perform DFS instead of floyd-warshall, this shit speedup this process in a bit
|
// perform DFS instead of floyd-warshall, this shit speedup this process in a bit
|
||||||
PathWalk walk;
|
PathWalk walk;
|
||||||
|
walk.init (m_paths.length ());
|
||||||
|
|
||||||
Array <bool> visited;
|
Array <bool> visited;
|
||||||
visited.resize (m_paths.length ());
|
visited.resize (m_paths.length ());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue