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 1/2] 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 From 7c916f93a0b0a4fd85aa064dc58270ed0a63e843 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 2 Nov 2021 00:30:57 +0100 Subject: [PATCH 2/2] Update changelog with recent additions --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b53fc5..f462856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed + +- [Health and breath bars now adapt to custom maximum values instead of being hardcoded to 20 and 11 respectively.](https://github.com/minetest-mods/gauges/pull/9) + +### Fixed + +- [The health bar entity is no longer lost when a player teleports.](https://github.com/minetest-mods/gauges/pull/10) + - A side effect is that health bar entities are no longer saved in map metadata. + ## [1.0.4] - 2020-09-27 ### Added