mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-17 21:23:44 +01:00
Fix #1911, error in lightning callback
This commit is contained in:
@ -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")
|
||||||
mob:set_yaw(angle-math.pi/2)
|
if mob then
|
||||||
|
mob:set_yaw(angle-math.pi/2)
|
||||||
|
end
|
||||||
angle = angle + (math.pi*2) / 3
|
angle = angle + (math.pi*2) / 3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user