mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Fixed mobs' update
This commit is contained in:
parent
20db3b7637
commit
a7e5bacb65
@ -1130,14 +1130,13 @@ function mobs:explosion(pos, radius, fire, smoke, sound)
|
||||
elseif n.name == "doors:door_wood_t_1" then
|
||||
minetest.remove_node({x=np.x,y=np.y-1,z=np.z})
|
||||
end
|
||||
if fire > 0 and (minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30) then
|
||||
minetest.set_node(p, {name="fire:basic_flame"})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
end
|
||||
if smoke > 0 then
|
||||
effect(p, 2, "tnt_smoke.png", 5)
|
||||
end
|
||||
if fire > 0 and (minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30) then
|
||||
minetest.set_node(p, {name="fire:basic_flame"})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
end
|
||||
if smoke > 0 then
|
||||
effect(p, 2, "tnt_smoke.png", 5)
|
||||
end
|
||||
end
|
||||
vi = vi + 1
|
||||
|
@ -94,6 +94,7 @@ mobs:register_mob("mobs:npc", {
|
||||
self.diamond_count = (self.diamond_count or 0) + 1
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
item:take_item()
|
||||
end
|
||||
-- pick up npc
|
||||
elseif item:get_name() == "mobs:magic_lasso"
|
||||
and clicker:is_player()
|
||||
@ -120,7 +121,6 @@ mobs:register_mob("mobs:npc", {
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == clicker:get_player_name() then
|
||||
self.damages = 4
|
||||
else
|
||||
if self.order == "follow" then
|
||||
self.order = "stand"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user