aim: do not reduce prediction for grenades

refactor: standardize access to bot files
graph: allow to specify graph upload url via cvar
graph. do not spam if extensions files  are not found
This commit is contained in:
jeefo 2023-04-13 03:05:35 +03:00
commit 9c73a070b7
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
11 changed files with 160 additions and 86 deletions

View file

@ -343,8 +343,8 @@ public:
bool loadGraphData ();
bool canDownload ();
template <typename U> bool saveStorage (StringRef ext, StringRef name, StorageOption options, StorageVersion version, const SmallArray <U> &data, ExtenHeader *exten);
template <typename U> bool loadStorage (StringRef ext, StringRef name, StorageOption options, StorageVersion version, SmallArray <U> &data, ExtenHeader *exten, int32_t *outOptions);
template <typename U> bool saveStorage (StringRef name, StorageOption options, StorageVersion version, const SmallArray <U> &data, ExtenHeader *exten);
template <typename U> bool loadStorage (StringRef name, StorageOption options, StorageVersion version, SmallArray <U> &data, ExtenHeader *exten, int32_t *outOptions);
template <typename ...Args> bool raiseLoadingError (bool isGraph, MemFile &file, const char *fmt, Args &&...args);
void saveOldFormat ();
@ -389,9 +389,6 @@ public:
void showStats ();
void showFileInfo ();
const char *getDataDirectory (bool isMemoryFile = false);
const char *getOldFormatGraphName (bool isMemoryFile = false);
IntArray getNarestInRadius (float radius, const Vector &origin, int maxCount = -1);
const IntArray &getNodesInBucket (const Vector &pos);
@ -490,7 +487,11 @@ public:
// helper for reporting load errors
template <typename ...Args> bool BotGraph::raiseLoadingError (bool isGraph, MemFile &file, const char *fmt, Args &&...args) {
auto result = strings.format (fmt, cr::forward <Args> (args)...);
logger.error (result);
// display error only for graph file
if (isGraph || cv_debug.bool_ ()) {
logger.error (result);
}
// if graph reset paths
if (isGraph) {