From b08db516d5d18e10872db6cd5b235d2c2203c99c Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Tue, 2 Nov 2021 01:39:10 +0300 Subject: [PATCH] Don't lose hp_bar when teleporting If a player teleports far away, their hp_bar can become deactivated and disappear. The mod installs the gauge only when a player joins, so it will be forever missing. `static_save = false` prevents the item from deactivating https://github.com/minetest/minetest/blob/master/src/serverenvironment.cpp#L2028 . Also, it doesn't make sense to save `gauges:hp_bar` to map meta since it's not a standalone item. --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index e28f652..5e869bd 100644 --- a/init.lua +++ b/init.lua @@ -45,6 +45,7 @@ minetest.register_entity("gauges:hp_bar", { textures = {"blank.png"}, collisionbox = {0}, physical = false, + static_save = false, on_step = function(self) local player = self.wielder