]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/aim.qc
Merge branch 'master' into martin-t/defaults
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / aim.qc
index 7441ce7bcab56cfafd3cf9e1ac8b6b68eab9385d..3a9befde403f9ee2a8fb6c2f99076af8ca433d9f 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "../../weapons/weaponsystem.qh"
 
-#include "../../mutators/_mod.qh"
+#include <server/mutators/_mod.qh>
 
 // traces multiple trajectories to find one that will impact the target
 // 'end' vector is the place it aims for,
@@ -132,18 +132,19 @@ bool bot_shouldattack(entity this, entity targ)
                if(targ.team==0)
                        return false;
        }
-       else if(bot_ignore_bots)
-               if(IS_BOT_CLIENT(targ))
-                       return false;
+       else if (autocvar_bot_ignore_bots && IS_BOT_CLIENT(targ))
+               return false;
 
        if (!targ.takedamage)
                return false;
        if (IS_DEAD(targ))
                return false;
-       if (PHYS_INPUT_BUTTON_CHAT(targ))
+       if (PHYS_INPUT_BUTTON_CHAT(targ) && !autocvar_bot_typefrag)
                return false;
        if(targ.flags & FL_NOTARGET)
                return false;
+       if(targ.alpha <= 0.1 && targ.alpha != 0)
+               return false; // invisible via alpha
 
        if(MUTATOR_CALLHOOK(BotShouldAttack, this, targ))
                return false;