Added some checks for protection

master
npx 2017-02-07 23:28:48 +01:00
parent 92d599682e
commit 7bd31eaeac
2 changed files with 3 additions and 2 deletions

View File

@ -75,6 +75,9 @@ mobs:register_mob("nssm:mese_dragon", {
self.attack_rip = self.attack_rip+1
local s = self.object:getpos()
if minetest.is_protected(s, "") then
return
end
local p = self.attack:getpos()
p.y = p.y + 1.5

View File

@ -345,10 +345,8 @@ function digging_attack(
dir = vector.normalize(dir)
local per = perpendicular_vector(dir)
local posp = vector.add(s,dir)
--minetest.chat_send_all("La mia posizione:"..minetest.pos_to_string(s))
--minetest.chat_send_all("La posizione davanti:"..minetest.pos_to_string(posp))
posp = vector.subtract(posp,per)