From 9562a7cca17004d6c2ee3e6b0e326c2058e930c0 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 21 Jan 2021 04:37:06 -0600 Subject: [PATCH] Fix black health bar --- scripts/client/nametag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/client/nametag.js b/scripts/client/nametag.js index a2111f9e..744c1996 100644 --- a/scripts/client/nametag.js +++ b/scripts/client/nametag.js @@ -76,7 +76,7 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour, let hy = y-10/2; let colourB = toColour(0, 0, 0, Math.floor(255.0*alpha)); // Background colour (black) drawing.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB); - let colour = toColour(Math.floor(255.0*alpha), Math.floor(255.0-(health*255.0)), Math.floor(health*255.0), 0); // Health bar colour (varies, depending on health) + let colour = toColour(Math.floor(255.0-(health*255.0)), Math.floor(health*255.0), 0, Math.floor(255.0*alpha)); // Health bar colour (varies, depending on health) drawing.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour); }