fix: report about hostage rescuing when the bot is leading them

This commit is contained in:
Владислав Сухов 2024-04-26 18:23:20 +00:00
commit ffb92ca962

View file

@ -2326,7 +2326,7 @@ void Bot::checkRadioQueue () {
// don't allow bot listen you if bot is busy // don't allow bot listen you if bot is busy
if (getCurrentTaskId () == Task::DefuseBomb || getCurrentTaskId () == Task::PlantBomb || m_hasHostage || m_hasC4) { if (m_radioOrder != Radio::ReportInTeam && (getCurrentTaskId () == Task::DefuseBomb || getCurrentTaskId () == Task::PlantBomb || m_hasHostage || m_hasC4)) {
m_radioOrder = 0; m_radioOrder = 0;
return; return;
} }
@ -2630,14 +2630,14 @@ void Bot::checkRadioQueue () {
const Path &path = graph[getTask ()->data]; const Path &path = graph[getTask ()->data];
if (path.flags & NodeFlag::Goal) { if (path.flags & NodeFlag::Goal) {
if (game.mapIs (MapFlags::Demolition) && m_team == Team::Terrorist && m_hasC4) { if (m_hasC4) {
pushChatterMessage (Chatter::GoingToPlantBomb); pushChatterMessage (Chatter::GoingToPlantBomb);
} }
else { else {
pushChatterMessage (Chatter::Nothing); pushChatterMessage (Chatter::Nothing);
} }
} }
else if (path.flags & NodeFlag::Rescue) { else if (m_hasHostage) {
pushChatterMessage (Chatter::RescuingHostages); pushChatterMessage (Chatter::RescuingHostages);
} }
else if ((path.flags & NodeFlag::Camp) && rg.chance (75)) { else if ((path.flags & NodeFlag::Camp) && rg.chance (75)) {