0bot: allow bots to check breakable team (fix #693)

This commit is contained in:
jeefo 2025-06-19 00:21:34 +03:00
commit 1394d08a28
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 21 additions and 2 deletions

View file

@ -281,6 +281,12 @@ edict_t *Bot::lookupBreakable () {
if (game.isNullEntity (ent)) {
return false;
}
// check breakable team, needed for some plugins
if (ent->v.team > 0 && ent->v.team != game.getGameTeam (this->ent ())) {
return false;
}
for (const auto &br : m_ignoredBreakable) {
if (br == ent) {
return false;