Added custom monsters and custom items support
This commit is contained in:
parent
ac86926dc8
commit
d5107daad4
7 changed files with 82 additions and 6 deletions
|
|
@ -1652,7 +1652,7 @@ void BotManager::updateIntrestingEntities () {
|
|||
auto classname = e->v.classname.chars ();
|
||||
|
||||
// search for grenades, weaponboxes, weapons, items and armoury entities
|
||||
if (strncmp ("weaponbox", classname, 9) == 0 || strncmp ("grenade", classname, 7) == 0 || strncmp ("item", classname, 4) == 0 || strncmp ("armoury", classname, 7) == 0) {
|
||||
if (strncmp ("weaponbox", classname, 9) == 0 || strncmp ("grenade", classname, 7) == 0 || util.isItem (e) || strncmp ("armoury", classname, 7) == 0) {
|
||||
m_intrestingEntities.push (e);
|
||||
}
|
||||
|
||||
|
|
@ -1671,6 +1671,10 @@ void BotManager::updateIntrestingEntities () {
|
|||
m_intrestingEntities.push (e);
|
||||
}
|
||||
|
||||
if (cv_attack_monsters.bool_ () && util.isMonster (e)) {
|
||||
m_intrestingEntities.push (e);
|
||||
}
|
||||
|
||||
// continue iteration
|
||||
return EntitySearchResult::Continue;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue