From dc7cdd4df0f8e31195e770e00c0a3933c1acabe2 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 8 Aug 2018 10:33:23 +0100 Subject: make mobs:line_of_sight() global --- api.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api.lua') diff --git a/api.lua b/api.lua index 4475ffa..8dd2ce5 100644 --- a/api.lua +++ b/api.lua @@ -281,6 +281,11 @@ local line_of_sight = function(self, pos1, pos2, stepsize) return false end +-- global function +mobs:line_of_sight = function(self, pos1, pos2, stepsize) + return local line_of_sight = function(self, pos1, pos2, stepsize) +end + -- are we flying in what we are suppose to? (taikedz) local flight_check = function(self, pos_w) -- cgit v1.2.3