From 1e04bf06a0258e057a0221ffc41e4cf011fe5121 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sat, 15 Jun 2024 22:51:09 +0100 Subject: [PATCH] Check mobs are not touching nodes in `group:puts_out_fire` BEFORE burninating. Should fix the remaining flashing (see #3655). --- mods/ENTITIES/mcl_mobs/physics.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index 5d5aeda6e..646cd5560 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -653,8 +653,11 @@ function mob_class:do_env_damage() local _, dim = mcl_worlds.y_to_layer(pos.y) if (self.sunlight_damage ~= 0 or self.ignited_by_sunlight) and (sunlight or 0) >= minetest.LIGHT_MAX and dim == "overworld" then if self.armor_list and not self.armor_list.helmet or not self.armor_list or self.armor_list and self.armor_list.helmet and self.armor_list.helmet == "" then - if (self.ignited_by_sunlight and not mcl_weather.rain.raining) then - mcl_burning.set_on_fire(self.object, 10) + if (self.ignited_by_sunlight and (not mcl_weather.rain.raining or not mcl_weather.has_rain(pos))) then + if (#mcl_burning.get_touching_nodes(self.object, "group:puts_out_fire", self) == 0) then + minetest.log("owow") + mcl_burning.set_on_fire(self.object, 10) + end else self:deal_light_damage(pos, self.sunlight_damage) return true