From 11f59716547405622f03be377821bbcb78298234 Mon Sep 17 00:00:00 2001 From: cheapie Date: Fri, 12 Dec 2025 12:53:50 -0600 Subject: More minor performance improvements --- pilantern.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pilantern.lua') diff --git a/pilantern.lua b/pilantern.lua index 29f3cf7..a2ded98 100644 --- a/pilantern.lua +++ b/pilantern.lua @@ -29,7 +29,9 @@ minetest.register_entity("celevator:incar_pi_entity",{ glow = minetest.LIGHT_MAX, }, on_step = function(self) + if not self.object then return end local pos = self.object:get_pos() + if not minetest.compare_block_status(pos,"active") then return self.object:remove() end local props = self.object:get_properties() if props.breath_max and props.breath_max ~= 0 then local carinfo = minetest.deserialize(celevator.storage:get_string(string.format("car%d",props.breath_max))) -- cgit v1.2.3