Skip to content

Conversation

@H41ogen
Copy link
Contributor

@H41ogen H41ogen commented Nov 15, 2025

Fixes #2308.
The healthbar now displays the health rounded up, which prevents it from displaying as 0 when the player's health is above 0.

if(health + 0.5 < main.game.Player.super.health) {
heartTexture.bindTo(0);
} else if(health + 0.5 <= main.game.Player.super.health) {
} else if(health < main.game.Player.super.health) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly this whole construct is rather confusing. Would you mind cleaning it up a little while you are at it?

Ideally it should be separate loops, one for full hearts, one for empty hearts and one if for the half heart. With the number computed upfront.

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

The player can appear to have 0 health yet not die

2 participants