add: new chatter events
This commit is contained in:
parent
9f927f687e
commit
35def2ab05
8 changed files with 34 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -190,7 +190,6 @@ void Bot::normal_ () {
|
|||
|
||||
// decide to duck or not to duck
|
||||
selectCampButtons (index);
|
||||
pushChatterMessage (Chatter::GoingToGuardVIPSafety); // play info about that
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue