diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index b017dddb9..38fa47364 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -11149,6 +11149,7 @@ static BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs "typedef struct\n{\n" \ "\tvector dest;\n" \ "\tint linkflags;\n"\ + "\tfloat radius;\n"\ "} nodeslist_t;\n" {"route_calculate", PF_route_calculate,0, 0, 0, 0, D(qcnodeslist "void(entity ent, vector dest, int denylinkflags, void(entity ent, vector dest, int numnodes, nodeslist_t *nodelist) callback)", "Begin calculating a route. The callback function will be called once the route has finished being calculated. The route must be memfreed once it is no longer needed. The route must be followed in reverse order (ie: the first node that must be reached is at index numnodes-1). If no route is available then the callback will be called with no nodes.")}, #endif diff --git a/engine/server/sv_move.c b/engine/server/sv_move.c index 7dbef3f9e..9181d0604 100644 --- a/engine/server/sv_move.c +++ b/engine/server/sv_move.c @@ -647,6 +647,7 @@ struct waypointnetwork_s { vec3_t pos; int linkflags; + float radius; } *displaynode; size_t displaynodes; @@ -884,6 +885,7 @@ static qboolean Route_Completed(struct routecalc_s *r, nodefrom_t *nodecamefrom) //target point is first. yay. VectorCopy(r->end, r->resultnodes[0].pos); r->resultnodes[0].linkflags = LF_DESTINATION; + r->resultnodes[0].radius = 32; r->numresultnodes++; u = r->endn; @@ -891,6 +893,7 @@ static qboolean Route_Completed(struct routecalc_s *r, nodefrom_t *nodecamefrom) { VectorCopy(n->waypoints[u].org, r->resultnodes[r->numresultnodes].pos); r->resultnodes[r->numresultnodes].linkflags = nodecamefrom[u].flags; + r->resultnodes[r->numresultnodes].radius = n->waypoints[u].radius; r->numresultnodes++; if (u == r->startn) break; @@ -900,6 +903,7 @@ static qboolean Route_Completed(struct routecalc_s *r, nodefrom_t *nodecamefrom) //and include the start point, because we can VectorCopy(r->start, r->resultnodes[r->numresultnodes].pos); r->resultnodes[r->numresultnodes].linkflags = 0; + r->resultnodes[r->numresultnodes].radius = 32; r->numresultnodes++; return true; }