aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2016-12-01 20:15:37 +0100
committerparamat <mat.gregory@virginmedia.com>2017-12-26 21:51:32 +0000
commit2153965cf92ab61b0d7e095cf3c2755924fdc221 (patch)
tree3895bdca9684f0f94a2a9f8653e013eecc0d4e1e /doc
parentca64f564cd23dba45bc93b57a718dfe81df5ba27 (diff)
downloadminetest-2153965cf92ab61b0d7e095cf3c2755924fdc221.tar.gz
minetest-2153965cf92ab61b0d7e095cf3c2755924fdc221.tar.bz2
minetest-2153965cf92ab61b0d7e095cf3c2755924fdc221.zip
Line_of_sight: Improve using VoxelLineIterator
This commit rewrites line_of_sight with VoxelLineIterator. Stepsize is no longer needed, the results will be always accurate.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 0637c346b..59884621b 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2876,13 +2876,12 @@ and `minetest.auth_reload` call the authentication handler.
* parameter was absent)
* `minetest.delete_area(pos1, pos2)`
* delete all mapblocks in the area from pos1 to pos2, inclusive
-* `minetest.line_of_sight(pos1, pos2, stepsize)`: returns `boolean, pos`
- * Check if there is a direct line of sight between `pos1` and `pos2`
+* `minetest.line_of_sight(pos1, pos2)`: returns `boolean, pos`
+ * Checks if there is anything other than air between pos1 and pos2.
+ * Returns false if something is blocking the sight.
* Returns the position of the blocking node when `false`
* `pos1`: First position
* `pos2`: Second position
- * `stepsize`: smaller gives more accurate results but requires more computing
- time. Default is `1`.
* `minetest.raycast(pos1, pos2, objects, liquids)`: returns `Raycast`
* Creates a `Raycast` object.
* `pos1`: start of the ray