From 40a89fb26f5649f9c18045161e7e9dea9aaac5b3 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 27 Sep 2020 02:27:03 +1000 Subject: [PATCH] - Duke/RR: Fix alt HUD health flashing when > 100. --- source/games/duke/src/sbar_d.cpp | 2 +- source/games/duke/src/sbar_r.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/sbar_d.cpp b/source/games/duke/src/sbar_d.cpp index 75c79bc08..605170529 100644 --- a/source/games/duke/src/sbar_d.cpp +++ b/source/games/duke/src/sbar_d.cpp @@ -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); diff --git a/source/games/duke/src/sbar_r.cpp b/source/games/duke/src/sbar_r.cpp index befcc4467..7c8453d60 100644 --- a/source/games/duke/src/sbar_r.cpp +++ b/source/games/duke/src/sbar_r.cpp @@ -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);