3 Commits

Author SHA1 Message Date
b7051168f1 Merge remote-tracking branch 'upstream/master' 2021-11-06 09:18:25 +01:00
7c916f93a0 Update changelog with recent additions 2021-11-02 00:31:29 +01:00
b08db516d5 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.
2021-11-02 00:20:07 +01:00
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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