From 69367aa7998d3817db1d4b101f36a6e25b1becf8 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 17 Mar 2013 17:03:44 +0000 Subject: Add Dijkstra A* and A* without prefetching pathfind algorithms --- doc/lua_api.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index de73ecd3f..285f3d205 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1185,7 +1185,21 @@ methods: - get_perlin(seeddiff, octaves, persistence, scale) ^ Return world-specific perlin noise (int(worldseed)+seeddiff) - clear_objects() - ^ clear all objects in the environments + ^ clear all objects in the environments +- line_of_sight(pos1,pos2,stepsize) ->true/false + ^ checkif there is a direct line of sight between pos1 and pos2 + ^ pos1 First position + ^ pos2 Second position + ^ stepsize smaller gives more accurate results but requires more computing + time. Default is 1. +-find_path(pos1,pos2,searchdistance,max_jump,max_drop,algorithm) -> table containing path + ^ returns a table of 3d points representing a path from pos1 to pos2 or nil + ^ pos1: start position + ^ pos2: end position + ^ searchdistance: number of blocks to search in each direction + ^ max_jump: maximum height difference to consider walkable + ^ max_drop: maximum height difference to consider droppable + ^ algorithm: A*_noprefetch(default), A*, Dijkstra - spawn_tree (pos, {treedef}) ^ spawns L-System tree at given pos with definition in treedef table treedef={ -- cgit v1.2.3