graph: always use lowercase map name when downloading graph
package: use default graph endpoint instead of cdn
This commit is contained in:
parent
18456c2a28
commit
8f688b1bc7
3 changed files with 6 additions and 3 deletions
|
|
@ -1611,7 +1611,7 @@ bool BotGraph::loadGraphData () {
|
|||
int mapSize = getBspSize ();
|
||||
|
||||
if (mapSize != exten.mapSize) {
|
||||
msg ("Warning: Graph data is probably not for this map. Please check bots behaviour.");
|
||||
msg ("Warning: Graph data is probably not for this map. Please check bots behavior.");
|
||||
}
|
||||
}
|
||||
cv_debug_goal.set (kInvalidNodeIndex);
|
||||
|
|
|
|||
|
|
@ -43,10 +43,13 @@ template <typename U> bool BotStorage::load (SmallArray <U> &data, ExtenHeader *
|
|||
if (!graph.canDownload ()) {
|
||||
return false;
|
||||
}
|
||||
String lowercaseMapName = game.getMapName ();
|
||||
lowercaseMapName = lowercaseMapName.lowercase ();
|
||||
|
||||
auto downloadAddress = cv_graph_url.str ();
|
||||
|
||||
auto toDownload = buildPath (storageToBotFile (type.option), false);
|
||||
auto fromDownload = strings.format ("http://%s/graph/%s.graph", downloadAddress, game.getMapName ());
|
||||
auto fromDownload = strings.format ("http://%s/graph/%s.graph", downloadAddress, lowercaseMapName);
|
||||
|
||||
// try to download
|
||||
if (http.downloadFile (fromDownload, toDownload)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue