A few tweaks to make the HP bar work constnantly, probably not the most efficient but it's good enough for now.

This commit is contained in:
Zed A. Shaw 2025-02-24 12:05:54 -05:00
parent dfd59065f7
commit 1886c99920
5 changed files with 6 additions and 7 deletions

View file

@ -319,8 +319,6 @@ namespace gui {
if(damage.enemy_did > 0) {
$status_ui.log(fmt::format("Enemy HIT YOU for {} damage!", damage.enemy_did));
auto player_combat = world.get<Combat>(player.entity);
$combat_ui.set_damage(float(player_combat.hp) / float(player_combat.max_hp));
} else {
$status_ui.log("Enemy MISSED YOU.");
}