From: Mario Date: Sat, 28 Apr 2018 19:33:46 +0000 (+1000) Subject: Don't allow bots to target entities with lower than 25% alpha visibility X-Git-Tag: xonotic-v0.8.5~2163 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=87706ea7271772bd30ed4279731815075b6ac3ec;p=xonotic%2Fxonotic-data.pk3dir.git Don't allow bots to target entities with lower than 25% alpha visibility --- diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index fde4c0154..5d74a8f06 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -143,6 +143,8 @@ bool bot_shouldattack(entity this, entity targ) return false; if(targ.flags & FL_NOTARGET) return false; + if(targ.alpha <= 0.25 && targ.alpha != 0) + return false; // invisible via alpha if(MUTATOR_CALLHOOK(BotShouldAttack, this, targ)) return false;