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.
This commit is contained in:
savilli 2021-11-02 01:39:10 +03:00 committed by Hugo Locurcio
parent 8e4faffe8d
commit b08db516d5

View File

@ -45,6 +45,7 @@ minetest.register_entity("gauges:hp_bar", {
textures = {"blank.png"}, textures = {"blank.png"},
collisionbox = {0}, collisionbox = {0},
physical = false, physical = false,
static_save = false,
on_step = function(self) on_step = function(self)
local player = self.wielder local player = self.wielder