fix: zombies should not emit any radio or chatter events

This commit is contained in:
jeefo 2024-05-25 23:42:55 +03:00
commit eec4101daa
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 11 additions and 7 deletions

View file

@ -917,7 +917,7 @@ void Bot::instantChatter (int type) {
void Bot::pushRadioMessage (int message) {
// this function inserts the radio message into the message queue
if (cv_radio_mode.as <int> () == 0 || m_numFriendsLeft == 0) {
if (cv_radio_mode.as <int> () == 0 || m_numFriendsLeft == 0 || m_isCreature) {
return;
}
m_forceRadio = !game.is (GameFlags::HasBotVoice)
@ -931,7 +931,7 @@ void Bot::pushRadioMessage (int message) {
void Bot::pushChatterMessage (int message) {
// this function inserts the voice message into the message queue (mostly same as above)
if (!game.is (GameFlags::HasBotVoice) || cv_radio_mode.as <int> () != 2 || !conf.hasChatterBank (message) || m_numFriendsLeft == 0) {
if (!game.is (GameFlags::HasBotVoice) || m_isCreature || cv_radio_mode.as <int> () != 2 || !conf.hasChatterBank (message) || m_numFriendsLeft == 0) {
return;
}
bool sendMessage = false;
@ -2322,7 +2322,7 @@ void Bot::checkRadioQueue () {
// don't allow bot listen you if bot is busy
if (getCurrentTaskId () == Task::DefuseBomb || getCurrentTaskId () == Task::PlantBomb || m_hasHostage || m_hasC4) {
if (getCurrentTaskId () == Task::DefuseBomb || getCurrentTaskId () == Task::PlantBomb || m_hasHostage || m_hasC4 || m_isCreature) {
m_radioOrder = 0;
return;
}