Xonotic
main.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool buildpath_nodefilter_none (vector n, vector c, vector p)
 
entity path_build (entity next, vector where, entity prev, entity start)
 

Function Documentation

◆ buildpath_nodefilter_none()

bool buildpath_nodefilter_none ( vector  n,
vector  c,
vector  p 
)

Definition at line 321 of file main.qc.

Referenced by pathlib_waypointpath_step().

322 {
323  return false;
324 }
+ Here is the caller graph for this function:

◆ path_build()

entity path_build ( entity  next,
vector  where,
entity  prev,
entity  start 
)

Definition at line 326 of file main.qc.

References buildpath_nodefilter(), entity(), next, setorigin(), and spawn().

Referenced by pathlib_astar(), and pathlib_waypointpath_step().

327 {
328  if(prev && next)
330  if(buildpath_nodefilter(next.origin,where,prev.origin))
331  return next;
332 
333 
334  entity path = spawn();
335  path.owner = start;
336  path.path_next = next;
337 
338  setorigin(path, where);
339 
340  if(!next)
341  path.classname = "path_end";
342  else
343  {
344  if(!prev)
345  path.classname = "path_start";
346  else
347  path.classname = "path_node";
348  }
349 
350  return path;
351 }
entity() spawn
prev
Definition: all.qh:66
var bool buildpath_nodefilter(vector n, vector c, vector p)
next
Definition: all.qh:88
setorigin(ent, v)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: