From 5d6efef49499f26d754c0506cd30f0e1689acd31 Mon Sep 17 00:00:00 2001 From: jeefo Date: Wed, 19 Jul 2023 13:30:55 +0300 Subject: [PATCH] cfg: update primary config with actual cvars and descriptions --- cfg/addons/yapb/conf/yapb.cfg | 40 +++++++++++++++++++++++------------ src/config.cpp | 2 +- src/navigate.cpp | 4 ++-- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/cfg/addons/yapb/conf/yapb.cfg b/cfg/addons/yapb/conf/yapb.cfg index 2cfc389..f47f1fe 100644 --- a/cfg/addons/yapb/conf/yapb.cfg +++ b/cfg/addons/yapb/conf/yapb.cfg @@ -214,6 +214,13 @@ yb_attack_monsters "0" // yb_pickup_custom_items "0" +// +// Allows bots pickup mod items like ammo, health kits and suits. +// --- +// Default: "0", Min: "0", Max: "1" +// +yb_pickup_ammo_and_kits "0" + // // Allows or disallows bots to pickup best weapons. // --- @@ -292,18 +299,18 @@ yb_stab_close_enemies "1" yb_bind_menu_key "=" // -// Specifies comma separated list of bot cvars, that will not be overriten by config on changelevel. +// Specifies comma separated list of bot cvars, that will not be overwritten by config on changelevel. // --- // Default: "yb_quota,yb_autovacate" // yb_ignore_cvars_on_changelevel "yb_quota,yb_autovacate" // -// Enables or disables display menu text, when players asks for menu. Useful only for Android. +// Disables logger to write anything to log file. Just spew content to the console. // --- -// Default: "1", Min: "0", Max: "1" +// Default: "0", Min: "0", Max: "1" // -yb_display_menu_text "1" +yb_logger_disable_logfile "0" // // The value (password) for the setinfo key, if user sets correct password, he's gains access to bot commands and menus. @@ -332,16 +339,16 @@ yb_password_key "_ybpw" yb_csdm_mode "0" // -// Specifies the maximum health of breakable object, that bot will consider to destroy. +// If enabled, bots will not apply game modes based on map name prefix (fy_ and ka_ specifically). // --- -// Default: "500.0", Min: "1.0", Max: "3000.0" +// Default: "0", Min: "0", Max: "1" // -yb_breakable_health_limit "500.0" +yb_ignore_map_prefix_game_mode "0" // // Maximum number of threads bot will run to process some tasks. -1 means half of CPU cores used. // --- -// Default: "-1", Min: "-1", Max: "12" +// Default: "-1", Min: "-1", Max: "16" // yb_threadpool_workers "-1" @@ -357,14 +364,14 @@ yb_graph_fixcamp "0" // --- // Default: "yapb.jeefo.net" // -yb_graph_url "yapb-gcdn.akamaized.net" +yb_graph_url "yapb.jeefo.net" // // Specifies the URL to which bots will try to upload the graph file to database. // --- -// Default: "http://yapb.jeefo.net/upload" +// Default: "yapb.jeefo.net/upload" // -yb_graph_url_upload "http://yapb.jeefo.net/upload" +yb_graph_url_upload "yapb.jeefo.net/upload" // // Every N graph nodes placed on map, the graph will be saved automatically (without checks). @@ -639,6 +646,13 @@ yb_display_welcome_text "1" // yb_enable_query_hook "0" +// +// Specifies the maximum health of breakable object, that bot will consider to destroy. +// --- +// Default: "500.0", Min: "1.0", Max: "3000.0" +// +yb_breakable_health_limit "500.0" + // // Specifies whether bots able to use 'shift' if they thinks that enemy is near. // --- @@ -670,7 +684,7 @@ yb_camping_time_max "45.0" // // Maximum number for path length, to predict the enemy. // --- -// Default: "20", Min: "15", Max: "256" +// Default: "25", Min: "15", Max: "256" // -yb_max_nodes_for_predict "20" +yb_max_nodes_for_predict "25" diff --git a/src/config.cpp b/src/config.cpp index 824a1a8..9ab2b2e 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -76,7 +76,7 @@ void BotConfig::loadMainConfig (bool isFirstLoad) { if (needsToIgnoreVar (ignore, key) && !strings.matches (value, cvar->string)) { // preserve quota number if it's zero - if (strings.matches (cvar->name, "yb_quota") && cv_quota.int_ () <= 0) { + if (cv_quota.name () == cvar->name && cv_quota.int_ () <= 0) { engfuncs.pfnCvar_DirectSet (cvar, value); continue; } diff --git a/src/navigate.cpp b/src/navigate.cpp index a73cc5e..4b5c540 100644 --- a/src/navigate.cpp +++ b/src/navigate.cpp @@ -1659,7 +1659,7 @@ bool Bot::findNextBestNode () { selected = busyIndex; } - // worst case... find atleast something + // worst case... find at least something if (selected == kInvalidNodeIndex) { selected = findNearestNode (); } @@ -1704,7 +1704,7 @@ void Bot::findValidNode () { else if (m_navTimeset + getEstimatedNodeReachTime () < game.time ()) { constexpr int maxDamageValue = PracticeLimit::Damage; - // increase danager for both teams + // increase danger for both teams for (int team = Team::Terrorist; team < kGameTeamNum; ++team) { int damageValue = practice.getDamage (team, m_currentNodeIndex, m_currentNodeIndex); damageValue = cr::clamp (damageValue + 100, 0, maxDamageValue);