backport: nodes flooder (analyzer) from cs-ebot

analyze: allow to disable goal marking
analyze: add cvars descriptions and bounds
nav: added optional post path smoothing for astar algorithm
nav: now bots will use Dijkstra algo instead of floyd-warshall if memory usage too high (controlled via yb_path_floyd_memory_limit cvar) (fixes #434)
nav: vistable are now calculated every frame to prevent game-freeze during loading the game (fixes #434)
graph: pracrice reworked to hash table so memory footprint is as low as possible (at cost 5-10% performance loss on practice) (fixes #434)
control: bots commands now is case-insensitive
bot: major refactoring of bot's code
nav: issue warnings about path fail only with debug
practice: check for visibility when updating danger index
analyzer: suspend any analyzing on change level
control: add kickall_ct/kickall_t
nav: increase blocked distance in stuck check
This commit is contained in:
jeefo 2023-05-02 09:42:43 +03:00 committed by GitHub
commit e7712a551a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 3114 additions and 1722 deletions

View file

@ -332,8 +332,8 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
// any case, when the new map will be booting, ServerActivate() will be called, so we'll do
// the loading of new bots and the new BSP data parsing there.
// save collected experience on shutdown
graph.savePractice ();
// save collected practice on shutdown
practice.save ();
// destroy global killer entity
bots.destroyKillerEntity ();
@ -384,9 +384,15 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
graph.frame ();
}
// update analyzer if needed
analyzer.update ();
// run stuff periodically
game.slowFrame ();
// rebuild vistable if needed
vistab.rebuild ();
if (bots.hasBotsOnline ()) {
// keep track of grenades on map
bots.updateActiveGrenade ();
@ -903,8 +909,9 @@ CR_EXPORT int Meta_Detach (PLUG_LOADTIME now, PL_UNLOAD_REASON reason) {
}
bots.kickEveryone (true); // kick all bots off this server
// save collected experience on shutdown
graph.savePractice ();
// save collected practice on shutdown
practice.save ();
util.disableSendTo ();
// make sure all stuff cleared