Browse Source

Added some checks for protection

master
npx 6 years ago
parent
commit
7bd31eaeac
  1. 3
      mobs/mese_dragon.lua
  2. 2
      nssm_api.lua

3
mobs/mese_dragon.lua

@ -75,6 +75,9 @@ mobs:register_mob("nssm:mese_dragon", { @@ -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

2
nssm_api.lua

@ -345,10 +345,8 @@ function digging_attack( @@ -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)

Loading…
Cancel
Save