forked from mtcontrib/mobs_redo
if mob standing, 1 in 4 chance of looking at player nearby
This commit is contained in:
parent
093285bec9
commit
7490006117
6
api.lua
6
api.lua
|
@ -1,5 +1,5 @@
|
|||
|
||||
-- Mobs Api (5th January 2017)
|
||||
-- Mobs Api (6th January 2017)
|
||||
|
||||
mobs = {}
|
||||
mobs.mod = "redo"
|
||||
|
@ -1272,9 +1272,6 @@ local do_states = function(self, dtime)
|
|||
|
||||
local lp = nil
|
||||
local s = self.object:getpos()
|
||||
|
||||
if self.type == "npc" then
|
||||
|
||||
local objs = minetest.get_objects_inside_radius(s, 3)
|
||||
|
||||
for n = 1, #objs do
|
||||
|
@ -1284,7 +1281,6 @@ local do_states = function(self, dtime)
|
|||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- look at any players nearby, otherwise turn randomly
|
||||
if lp then
|
||||
|
|
Loading…
Reference in New Issue
Block a user