1
0
Fork 0

Fix player not getting damage from lightning

mcl-structures-fixes
MysticTempest 2022-11-04 22:35:01 +01:00 committed by cora
parent fcba67b7e7
commit 15542d4878
1 changed files with 3 additions and 1 deletions

View File

@ -136,9 +136,11 @@ function lightning.strike_func(pos, pos2, objects)
for _, obj in pairs(objects) do for _, obj in pairs(objects) do
local lua = obj:get_luaentity() local lua = obj:get_luaentity()
if lua then 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" }) mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
end end
else
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
end end
end end