diff --git a/cfg/addons/yapb/conf/chatter.cfg b/cfg/addons/yapb/conf/chatter.cfg index 33ec11e..1bb2639 100644 --- a/cfg/addons/yapb/conf/chatter.cfg +++ b/cfg/addons/yapb/conf/chatter.cfg @@ -61,7 +61,10 @@ Event Chatter_HeardEnemy = i_hear_them, hang_on_i_heard_something, i_hear_someth Event Chatter_SniperWarning = sniper, sniper2, watch_it_theres_a_sniper Event Chatter_SniperKilled = got_the_sniper, got_the_sniper2, sniper_down, took_out_the_sniper, the_sniper_is_dead Event Chatter_VIPSpotted = i_see_our_target, target_spotted, target_acquired +Event Chatter_GuardingEscapeZone = watching_the_escape_zone, watching_the_escape_route, they_will_not_escape, im_at_the_escape_zone, guarding_the_escape_zone, guarding_the_escape_zone2 Event Chatter_GuardingVipSafety = watching_the_escape_route, im_at_the_escape_zone, watching_the_escape_zone, guarding_the_escape_zone, guarding_the_escape_zone2 +Event Chatter_GoingToGuardEscapeZone = im_going_to_keep_an_eye_on_the_escape, im_going_to_watch_the_escape_zone, im_going_to_cover_the_escape_zone +Event Chatter_GoingToGuardRescueZone = im_going_to_watch_the_rescue_zone, im_going_to_keep_an_eye_on_the_rescue Event Chatter_GoingToGuardVIPSafety = im_going_to_cover_the_escape_zone, im_going_to_watch_the_escape_zone, im_going_to_keep_an_eye_on_the_escape, heading_to_the_escape_zone Event Chatter_OneEnemyLeft = one_guy_left, theres_one_left Event Chatter_TwoEnemiesLeft = two_enemies_left, two_to_go diff --git a/inc/constant.h b/inc/constant.h index 01bc953..c768929 100644 --- a/inc/constant.h +++ b/inc/constant.h @@ -199,7 +199,10 @@ CR_DECLARE_SCOPED_ENUM (Chatter, SniperWarning, SniperKilled, VIPSpotted, + GuardingEscapeZone, GuardingVIPSafety, + GoingToGuardEscapeZone, + GoingToGuardRescueZone, GoingToGuardVIPSafety, QuickWonRound, OneEnemyLeft, diff --git a/inc/message.h b/inc/message.h index f830581..5eef43a 100644 --- a/inc/message.h +++ b/inc/message.h @@ -58,8 +58,10 @@ CR_DECLARE_SCOPED_ENUM (TextMsgCache, CR_DECLARE_SCOPED_ENUM (StatusIconCache, NeedHandle = cr::bit (0), BuyZone = cr::bit (1), - VipSafety = cr::bit (2), - C4 = cr::bit (3) + Escape = cr::bit (2), + Rescue = cr::bit (3), + VipSafety = cr::bit (4), + C4 = cr::bit (5) ) class MessageDispatcher final : public Singleton { diff --git a/inc/yapb.h b/inc/yapb.h index 0f24ec6..7ba132a 100644 --- a/inc/yapb.h +++ b/inc/yapb.h @@ -646,6 +646,8 @@ public: bool m_ignoreBuyDelay {}; // when reaching buyzone in the middle of the round don't do pauses bool m_inBombZone {}; // bot in the bomb zone or not bool m_inBuyZone {}; // bot currently in buy zone + bool m_inEscapeZone {}; // bot currently in escape zone + bool m_inRescueZone {}; // bot currently in rescue zone bool m_inVIPZone {}; // bot in the vip safety zone bool m_buyingFinished {}; // done with buying bool m_buyPending {}; // bot buy is pending diff --git a/src/botlib.cpp b/src/botlib.cpp index e9dc0f5..d9ced25 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -2185,6 +2185,14 @@ void Bot::startTask (Task id, float desire, int data, float time, bool resume) { } } + if (rg.chance (75) && tid == Task::Camp && m_team == Team::CT && m_inEscapeZone) { + pushChatterMessage (Chatter::GoingToGuardEscapeZone); + } + + if (rg.chance (75) && tid == Task::Camp && m_team == Team::Terrorist && m_inRescueZone) { + pushChatterMessage (Chatter::GoingToGuardRescueZone); + } + if (rg.chance (75) && tid == Task::Camp && m_team == Team::Terrorist && m_inVIPZone) { pushChatterMessage (Chatter::GoingToGuardVIPSafety); } @@ -2655,6 +2663,9 @@ void Bot::checkRadioQueue () { if (bots.isBombPlanted () && m_team == Team::Terrorist) { pushChatterMessage (Chatter::GuardingDroppedC4); } + else if (m_inEscapeZone && m_team == Team::CT) { + pushChatterMessage (Chatter::GuardingEscapeZone); + } else if (m_inVIPZone && m_team == Team::Terrorist) { pushChatterMessage (Chatter::GuardingVIPSafety); } diff --git a/src/config.cpp b/src/config.cpp index 1c08fec..2d7c7db 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -266,9 +266,12 @@ void BotConfig::loadChatterConfig () { { "Radio_EnemyDown", Radio::EnemyDown, 10.0f }, { "Chatter_DiePain", Chatter::DiePain, kMaxChatterRepeatInterval }, { "Chatter_GoingToPlantBomb", Chatter::GoingToPlantBomb, 5.0f }, + { "Chatter_GoingToGuardEscapeZone", Chatter::GoingToGuardEscapeZone, kMaxChatterRepeatInterval }, + { "Chatter_GoingToGuardRescueZone", Chatter::GoingToGuardRescueZone, kMaxChatterRepeatInterval }, { "Chatter_GoingToGuardVIPSafety", Chatter::GoingToGuardVIPSafety, kMaxChatterRepeatInterval }, { "Chatter_RescuingHostages", Chatter::RescuingHostages, kMaxChatterRepeatInterval }, { "Chatter_TeamKill", Chatter::TeamKill, kMaxChatterRepeatInterval }, + { "Chatter_GuardingEscapeZone", Chatter::GuardingEscapeZone, kMaxChatterRepeatInterval }, { "Chatter_GuardingVipSafety", Chatter::GuardingVIPSafety, kMaxChatterRepeatInterval }, { "Chatter_PlantingC4", Chatter::PlantingBomb, 10.0f }, { "Chatter_InCombat", Chatter::InCombat, kMaxChatterRepeatInterval }, diff --git a/src/message.cpp b/src/message.cpp index 275aa8d..acb67c8 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -255,6 +255,12 @@ void MessageDispatcher::netMsgStatusIcon () { // try to equip in buyzone m_bot->enteredBuyZone (BuyState::PrimaryWeapon); } + else if (cached & StatusIconCache::Escape) { + m_bot->m_inEscapeZone = (m_args[enabled].long_ != 0); + } + else if (cached & StatusIconCache::Rescue) { + m_bot->m_inRescueZone = (m_args[enabled].long_ != 0); + } else if (cached & StatusIconCache::VipSafety) { m_bot->m_inVIPZone = (m_args[enabled].long_ != 0); } @@ -491,6 +497,8 @@ MessageDispatcher::MessageDispatcher () { // register status icon cache m_statusIconCache["buyzone"] = StatusIconCache::NeedHandle | StatusIconCache::BuyZone; + m_statusIconCache["escape"] = StatusIconCache::NeedHandle | StatusIconCache::Escape; + m_statusIconCache["rescue"] = StatusIconCache::NeedHandle | StatusIconCache::Rescue; m_statusIconCache["vipsafety"] = StatusIconCache::NeedHandle | StatusIconCache::VipSafety; m_statusIconCache["c4"] = StatusIconCache::NeedHandle | StatusIconCache::C4; diff --git a/src/tasks.cpp b/src/tasks.cpp index 4e67e63..d25ac0b 100644 --- a/src/tasks.cpp +++ b/src/tasks.cpp @@ -190,7 +190,6 @@ void Bot::normal_ () { // decide to duck or not to duck selectCampButtons (index); - pushChatterMessage (Chatter::GoingToGuardVIPSafety); // play info about that } }