#48 Fix lightning crash

This commit is contained in:
kay27 2021-12-10 03:46:24 +04:00
parent 6db7984cdd
commit 5d73d69a82
1 changed files with 2 additions and 2 deletions

View File

@ -213,11 +213,11 @@ lightning.register_on_strike(function(pos, pos2, objects)
for i=1,3 do
posadd = { x=math.cos(angle),y=0,z=math.sin(angle) }
posadd = vector.normalize(posadd)
local mob = add_entity(vector.add(pos2, posadd), "mobs_mc:skeleton")
local mob = minetest.add_entity(vector.add(pos2, posadd), "mobs_mc:skeleton")
if mob then
mob:set_yaw(angle-math.pi/2)
angle = angle + (math.pi*2) / 3
end
angle = angle + (math.pi*2) / 3
end
-- Cause a fire