- Duke/RR: Fix alt HUD health flashing when > 100.

This commit is contained in:
Mitchell Richters 2020-09-27 02:27:03 +10:00
parent 837b7c0a30
commit 40a89fb26f
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ public:
{
int s = -8;
if (althud_flashing && p->last_extra > max_player_health)
s += (sintable[(ud.levelclock << 6) & 2047] >> 10);
s += (sintable[(I_GetBuildTime() << 5) & 2047] / 768);
int intens = clamp(255 - 6 * s, 0, 255);
format.Format("%d", p->last_extra);
SBar_DrawString(this, &numberFont, format, 25, texty, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, 1, 1);

View file

@ -110,7 +110,7 @@ public:
{
int s = -8;
if (althud_flashing && p->last_extra > max_player_health)
s += (sintable[(ud.levelclock << 6) & 2047] >> 10);
s += (sintable[(I_GetBuildTime() << 5) & 2047] / 768);
int intens = clamp(255 - 6 * s, 0, 255);
format.Format("%d", p->last_extra);
SBar_DrawString(this, &numberFont, format, 26.5, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, scale, scale);