0
0
Fork 0

Fix #1911, error in lightning callback

This commit is contained in:
NO11 2021-11-17 00:37:11 +01:00
parent e2b22a62ce
commit c757e98b4f
1 changed files with 3 additions and 1 deletions

View File

@ -215,7 +215,9 @@ lightning.register_on_strike(function(pos, pos2, objects)
posadd = { x=math.cos(angle),y=0,z=math.sin(angle) } posadd = { x=math.cos(angle),y=0,z=math.sin(angle) }
posadd = vector.normalize(posadd) posadd = vector.normalize(posadd)
local mob = add_entity(vector.add(pos2, posadd), "mobs_mc:skeleton") local mob = add_entity(vector.add(pos2, posadd), "mobs_mc:skeleton")
if mob then
mob:set_yaw(angle-math.pi/2) mob:set_yaw(angle-math.pi/2)
end
angle = angle + (math.pi*2) / 3 angle = angle + (math.pi*2) / 3
end end