X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fdefault%2Fnavigation.qc;h=90bfcc4e38d10bab94abe17a15ac891502856bd9;hp=19c0ed8e600337c22590dfda6342fb7fd91e226f;hb=c5fcf672c473edef7139d4250398184b8ae17224;hpb=a3d7cb5a3c18307e896ca1600afd26c6b8502773 diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 19c0ed8e60..90bfcc4e38 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -360,12 +360,12 @@ float navigation_waypoint_will_link(vector v, vector org, entity ent, float walk { if (walkfromwp) { - if (tracewalk(ent, v, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), org, bot_navigation_movemode)) + if (tracewalk(ent, v, STAT(PL_MIN, ent), STAT(PL_MAX, ent), org, bot_navigation_movemode)) return true; } else { - if (tracewalk(ent, org, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), v, bot_navigation_movemode)) + if (tracewalk(ent, org, STAT(PL_MIN, ent), STAT(PL_MAX, ent), v, bot_navigation_movemode)) return true; } } @@ -387,7 +387,7 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom }); vector org = ent.origin + 0.5 * (ent.mins + ent.maxs); - org.z = ent.origin.z + ent.mins.z - STAT(PL_MIN, NULL).z; // player height + org.z = ent.origin.z + ent.mins.z - STAT(PL_MIN, ent).z; // player height // TODO possibly make other code have the same support for bboxes if(ent.tag_entity) org = org + ent.tag_entity.origin; @@ -684,7 +684,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) float zdistance, xydistance, cost, t, fuel; vector down, npa, npb; - down = '0 0 -1' * (STAT(PL_MAX, NULL).z - STAT(PL_MIN, NULL).z) * 10; + down = '0 0 -1' * (STAT(PL_MAX, this).z - STAT(PL_MIN, this).z) * 10; do{ npa = pointa + down; @@ -842,7 +842,7 @@ bool navigation_routetogoal(entity this, entity e, vector startposition) return true; // if it can reach the goal there is nothing more to do - if (tracewalk(this, startposition, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), (e.absmin + e.absmax) * 0.5, bot_navigation_movemode)) + if (tracewalk(this, startposition, STAT(PL_MIN, this), STAT(PL_MAX, this), (e.absmin + e.absmax) * 0.5, bot_navigation_movemode)) return true; // see if there are waypoints describing a path to the item @@ -1046,7 +1046,7 @@ void navigation_unstuck(entity this) // evaluate the next goal on the queue float d = vlen2(this.origin - bot_waypoint_queue_goal.origin); LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d)); - if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), bot_waypoint_queue_goal.origin, bot_navigation_movemode)) + if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), bot_waypoint_queue_goal.origin, bot_navigation_movemode)) { if( d > bot_waypoint_queue_bestgoalrating) {