]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/aim.qc
Merge branch 'master' into terencehill/bot_ai
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / aim.qc
index 5d74a8f062e026c1e038b5c7b6fe82bc22e4e527..3abe91ee174d489878afb8934b9a9d6d2d6e039a 100644 (file)
@@ -143,7 +143,7 @@ bool bot_shouldattack(entity this, entity targ)
                return false;
        if(targ.flags & FL_NOTARGET)
                return false;
-       if(targ.alpha <= 0.25 && targ.alpha != 0)
+       if(targ.alpha <= 0.1 && targ.alpha != 0)
                return false; // invisible via alpha
 
        if(MUTATOR_CALLHOOK(BotShouldAttack, this, targ))
@@ -180,6 +180,8 @@ void bot_aimdir(entity this, vector v, float maxfiredeviation)
        float dist, delta_t, blend;
        vector desiredang, diffang;
 
+       this.bot_aimdir_executed = true;
+
        //dprint("aim ", this.netname, ": old:", vtos(this.v_angle));
        // make sure v_angle is sane first
        this.v_angle_y = this.v_angle.y - floor(this.v_angle.y / 360) * 360;