path_nextnode(ENTITY*,var node,var edge) returns 0 if there is no next node - so it must be a dead end.