From d3b3c596bd3f029ed690959384f474baab31a8c6 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 25 Feb 2017 02:22:56 +0100 Subject: [PATCH] Update HUD Bars mod to version 1.7.1 --- mods/HUD/hudbars/API.md | 4 ++-- mods/HUD/hudbars/README.md | 2 +- mods/HUD/hudbars/init.lua | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/HUD/hudbars/API.md b/mods/HUD/hudbars/API.md index 124da82cf9..312be99a15 100644 --- a/mods/HUD/hudbars/API.md +++ b/mods/HUD/hudbars/API.md @@ -1,5 +1,5 @@ -API documentation for the HUD bars mod 1.7.0 -============================================ +API documentation for the HUD bars mod +====================================== ## Introduction This API allows you to add, change, hide and unhide custom HUD bars for this mod. diff --git a/mods/HUD/hudbars/README.md b/mods/HUD/hudbars/README.md index 6571b7754a..9a5500c7ae 100644 --- a/mods/HUD/hudbars/README.md +++ b/mods/HUD/hudbars/README.md @@ -11,7 +11,7 @@ this mod will place them accordingly. position should be displayed correctly on every screen size. ## 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 standard. diff --git a/mods/HUD/hudbars/init.lua b/mods/HUD/hudbars/init.lua index 30a3491c80..fb5daa7ab2 100644 --- a/mods/HUD/hudbars/init.lua +++ b/mods/HUD/hudbars/init.lua @@ -523,7 +523,11 @@ local function update_hud(player) 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) update_health(player)