]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't select jumppads and teleporters as destination points for bots anyway
authorterencehill <piuntn@gmail.com>
Fri, 10 Feb 2017 15:38:28 +0000 (16:38 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 10 Feb 2017 15:38:28 +0000 (16:38 +0100)
qcsrc/server/bot/default/havocbot/roles.qc
qcsrc/server/bot/default/navigation.qc

index 6b9537651eb0a7ae7b931b30a8120425cf7b9fd2..d7890d11439b594a6d7ce2850ff3e7bae5347e64 100644 (file)
@@ -25,7 +25,8 @@ void havocbot_goalrating_waypoints(entity this, float ratingscale, vector org, f
        while(sradius > 100)
        {
                IL_EACH(g_waypoints, vdist(it.origin - org, <, sradius)
-                       && vdist(it.origin - org, >, max(100, sradius - range)),
+                       && vdist(it.origin - org, >, max(100, sradius - range))
+                       && !(it.wpflags & WAYPOINTFLAG_TELEPORT),
                {
                        if(vdist(it.origin - this.wp_goal_prev0.origin, <, range * 1.5))
                                f = 0.1;
index 2638958f5b43264368f6e65e88e318a341f56b6b..bfc72d60f5fd5d8432abaed7d66d1295d8d88694 100644 (file)
@@ -673,7 +673,9 @@ void navigation_routerating(entity this, entity e, float f, float rangebias)
                        entity theEnemy = e;
                        entity best_wp = NULL;
                        float best_dist = 10000;
-                       IL_EACH(g_waypoints, vdist(it.origin - theEnemy.origin, <, 500) && vdist(it.origin - this.origin, >, 100),
+                       IL_EACH(g_waypoints, vdist(it.origin - theEnemy.origin, <, 500)
+                               && vdist(it.origin - this.origin, >, 100)
+                               && !(it.wpflags & WAYPOINTFLAG_TELEPORT),
                        {
                                float dist = vlen(it.origin - theEnemy.origin);
                                if (dist < best_dist)