msg: use StatusIcon message to detect if bot has a defusal kit (ref #589)
This commit is contained in:
parent
b0da38b2ab
commit
690c4d660c
2 changed files with 6 additions and 1 deletions
|
|
@ -61,7 +61,8 @@ CR_DECLARE_SCOPED_ENUM (StatusIconCache,
|
|||
Escape = cr::bit (2),
|
||||
Rescue = cr::bit (3),
|
||||
VipSafety = cr::bit (4),
|
||||
C4 = cr::bit (5)
|
||||
C4 = cr::bit (5),
|
||||
Defuser = cr::bit (6)
|
||||
)
|
||||
|
||||
class MessageDispatcher final : public Singleton <MessageDispatcher> {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue