msg: use StatusIcon message to detect if bot has a defusal kit (ref #589)

This commit is contained in:
jeefo 2024-06-24 11:37:24 +03:00
commit 690c4d660c
No known key found for this signature in database
GPG key ID: D696786B81B667C8
2 changed files with 6 additions and 1 deletions

View file

@ -267,6 +267,9 @@ void MessageDispatcher::netMsgStatusIcon () {
else if (cached & StatusIconCache::C4) {
m_bot->m_inBombZone = (m_args[enabled].long_ == 2);
}
else if (cached && StatusIconCache::Defuser) {
m_bot->m_hasDefuser = (m_args[enabled].long_ != 0);
}
}
void MessageDispatcher::netMsgDeathMsg () {
@ -501,6 +504,7 @@ MessageDispatcher::MessageDispatcher () {
m_statusIconCache["rescue"] = StatusIconCache::NeedHandle | StatusIconCache::Rescue;
m_statusIconCache["vipsafety"] = StatusIconCache::NeedHandle | StatusIconCache::VipSafety;
m_statusIconCache["c4"] = StatusIconCache::NeedHandle | StatusIconCache::C4;
m_statusIconCache["defuser"] = StatusIconCache::NeedHandle | StatusIconCache::Defuser;
// register team info cache
m_teamInfoCache["TERRORIST"] = Team::Terrorist;