Update HUD Bars mod to version 1.7.1

This commit is contained in:
Wuzzy 2017-02-25 02:22:56 +01:00
parent 9ec16db5c2
commit d3b3c596bd
3 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
API documentation for the HUD bars mod 1.7.0 API documentation for the HUD bars mod
============================================ ======================================
## Introduction ## Introduction
This API allows you to add, change, hide and unhide custom HUD bars for this mod. This API allows you to add, change, hide and unhide custom HUD bars for this mod.

View File

@ -11,7 +11,7 @@ this mod will place them accordingly.
position should be displayed correctly on every screen size. position should be displayed correctly on every screen size.
## Current version ## Current version
The current version is 1.7.0. The current version is 1.7.1.
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
standard. standard.

View File

@ -523,7 +523,11 @@ local function update_hud(player)
end end
end end
minetest.register_on_player_hpchange(update_health) minetest.register_on_player_hpchange(function(player)
if hb.players[player:get_player_name()] ~= nil then
update_health(player)
end
end)
minetest.register_on_respawnplayer(function(player) minetest.register_on_respawnplayer(function(player)
update_health(player) update_health(player)