Fix player not getting damage from lightning

This commit is contained in:
MysticTempest 2022-11-04 22:35:01 +01:00 committed by cora
parent fcba67b7e7
commit 15542d4878

View file

@ -136,9 +136,11 @@ function lightning.strike_func(pos, pos2, objects)
for _, obj in pairs(objects) do
local lua = obj:get_luaentity()
if lua then
if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ) ~= true then
if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ~= true ) then
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
end
else
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
end
end