From 15542d4878f2a2c70453376f40ed357e4365f6ce Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Fri, 4 Nov 2022 22:35:01 +0100 Subject: [PATCH] Fix player not getting damage from lightning --- mods/ENVIRONMENT/lightning/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index 12c50ef29e..59591b061d 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -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