]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't allow bots to target entities with lower than 25% alpha visibility
authorMario <mario@smbclan.net>
Sat, 28 Apr 2018 19:33:46 +0000 (05:33 +1000)
committerMario <mario@smbclan.net>
Sat, 28 Apr 2018 19:33:46 +0000 (05:33 +1000)
qcsrc/server/bot/default/aim.qc

index fde4c0154a6199ebf4174ca23611c21cb7a2e650..5d74a8f062e026c1e038b5c7b6fe82bc22e4e527 100644 (file)
@@ -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;