Add files via upload

master
AiTechEye 2020-10-14 21:14:19 +02:00 committed by GitHub
parent 1700701f53
commit 45958b52f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -1682,14 +1682,16 @@ aliveai.create_bot({
spawn_y=0,
spawn=function(self)
local pos=self.object:get_pos()
local opos=pos
for i=0,10,1 do
if aliveai.def({x=pos.x,y=pos.y-i,z=pos.z,},"walkable") and not minetest.is_protected(opos,"") then
minetest.set_node(opos,{name="aliveai_threats:killerplant"})
aliveai.kill(self)
return
if pos then
local opos=pos
for i=0,10,1 do
if aliveai.def({x=pos.x,y=pos.y-i,z=pos.z,},"walkable") and not minetest.is_protected(opos,"") then
minetest.set_node(opos,{name="aliveai_threats:killerplant"})
aliveai.kill(self)
return
end
opos={x=pos.x,y=pos.y-i,z=pos.z,}
end
opos={x=pos.x,y=pos.y-i,z=pos.z,}
end
aliveai.kill(self)
end,