From b42e4e312a06cc4cbf0ae98b2636bb88dbccfa78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D0=B2?= <22411953+Vladislav4KZ@users.noreply.github.com> Date: Sat, 11 Jun 2022 02:18:06 +0600 Subject: [PATCH] add: yb_pickup_best cvar (#344) --- src/botlib.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/botlib.cpp b/src/botlib.cpp index f254c5c..9e537c2 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -34,6 +34,7 @@ ConVar cv_restricted_weapons ("yb_restricted_weapons", "", "Specifies semicolon ConVar cv_attack_monsters ("yb_attack_monsters", "0", "Allows or disallows bots to attack monsters."); ConVar cv_pickup_custom_items ("yb_pickup_custom_items", "0", "Allows or disallows bots to pickup custom items."); +ConVar cv_pickup_best ("yb_pickup_best", "1", "Allows or disallows bots to pickup best weapons."); ConVar cv_ignore_objectives ("yb_ignore_objectives", "0", "Allows or disallows bots to do map objectives, i.e. plant/defuse bombs, and saves hostages."); ConVar cv_random_knife_attacks ("yb_random_knife_attacks", "1", "Allows or disallows the ability for random knife attacks when bot is rushing and no enemy is nearby."); @@ -519,7 +520,7 @@ void Bot::updatePickups () { // this function finds Items to collect or use in the near of a bot // don't try to pickup anything while on ladder or trying to escape from bomb... - if (isOnLadder () || getCurrentTaskId () == Task::EscapeFromBomb || cv_jasonmode.bool_ () || !bots.hasIntrestingEntities ()) { + if (isOnLadder () || getCurrentTaskId () == Task::EscapeFromBomb || !cv_pickup_best.bool_ () || cv_jasonmode.bool_ () || !bots.hasIntrestingEntities ()) { m_pickupItem = nullptr; m_pickupType = Pickup::None;