-#include "../_all.qh"
#include "pathlib.qh"
#include "utility.qh"
e = findchainentity(owner, start);
while(e)
{
- e.think = SUB_Remove;
+ e.think = SUB_Remove_self;
e.nextthink = time;
e = e.chain;
}
void dumpnode(entity n)
{
n.is_path_node = false;
- n.think = SUB_Remove;
+ n.think = SUB_Remove_self;
n.nextthink = time;
}
+#ifdef DEBUGPATHING
+void pathlib_showpath(entity start);
+void pathlib_showpath2(entity path);
+#endif
+
+void pathlib_showsquare(vector where,float goodsquare,float _lifetime);
+void pathlib_showsquare2(entity node ,vector ncolor,float align);
+
entity pathlib_mknode(vector where,entity parent)
{
entity node;
node = spawn();
- node.think = SUB_Remove;
+ node.think = SUB_Remove_self;
node.nextthink = time + PATHLIB_NODEEXPIRE;
node.is_path_node = true;
node.owner = openlist;
}
entity pathlib_astar(vector from,vector to)
-{
+{SELFPARAM();
entity path, start, end, open, n, ln;
float ptime, ftime, ctime;
{
LOG_TRACE("AStar: Goal found on first node!\n");
- open = spawn();
+ open = new(path_end);
open.owner = open;
- open.classname = "path_end";
setorigin(open,path.origin);
pathlib_cleanup();