From: terencehill Date: Fri, 10 Feb 2017 15:38:28 +0000 (+0100) Subject: Don't select jumppads and teleporters as destination points for bots anyway X-Git-Tag: xonotic-v0.8.2~202^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7db499f330f619365b3c1f0402bcfd24fcb9492e;p=xonotic%2Fxonotic-data.pk3dir.git Don't select jumppads and teleporters as destination points for bots anyway --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 6b9537651..d7890d114 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -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; diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 2638958f5..bfc72d60f 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -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)