fix: behavior with bomb, when ignoring objectives (ref #696)

This commit is contained in:
jeefo 2025-05-22 22:05:48 +03:00
commit 9cb8171030
No known key found for this signature in database
GPG key ID: D696786B81B667C8
5 changed files with 58 additions and 40 deletions

View file

@ -199,7 +199,7 @@ int Bot::findBestGoal () {
int Bot::findBestGoalWhenBombAction () {
int result = kInvalidNodeIndex;
if (!bots.isBombPlanted ()) {
if (!bots.isBombPlanted () && !cv_ignore_objectives) {
game.searchEntities ("classname", "weaponbox", [&] (edict_t *ent) {
if (util.isModel (ent, "backpack.mdl")) {
result = graph.getNearest (game.getEntityOrigin (ent));