diff --git a/source/games/duke/src/sbar_d.cpp b/source/games/duke/src/sbar_d.cpp index d5acf5e62..b97b1485b 100644 --- a/source/games/duke/src/sbar_d.cpp +++ b/source/games/duke/src/sbar_d.cpp @@ -133,11 +133,10 @@ public: { int s = -8; if (althud_flashing && p->last_extra > max_player_health) - s += (sintable[(gameclock << 5) & 2047] >> 10); - int intens = clamp(255 - 4 * s, 0, 255); - auto pe = PalEntry(255, intens, intens, intens); + s += (sintable[(gameclock << 6) & 2047] >> 10); + 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, 1, 0, 0, 1, 1); + 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 e7f322bd9..69287258b 100644 --- a/source/games/duke/src/sbar_r.cpp +++ b/source/games/duke/src/sbar_r.cpp @@ -106,15 +106,16 @@ public: imgScale = baseScale / img->GetDisplayHeight(); DrawGraphic(img, 2, -2, DI_ITEM_LEFT_BOTTOM, 1, 0, 0, imgScale, imgScale); + int gameclock = I_GetBuildTime(); + if (!althud_flashing || p->last_extra > (max_player_health >> 2) || (gameclock & 32) || (sprite[p->i].pal == 1 && p->last_extra < 2)) { int s = -8; if (althud_flashing && p->last_extra > max_player_health) - s += (sintable[(gameclock << 5) & 2047] >> 10); - int intens = clamp(255 - 4 * s, 0, 255); - auto pe = PalEntry(255, intens, intens, intens); + s += (sintable[(gameclock << 6) & 2047] >> 10); + 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, 1, 0, 0, scale, scale); + SBar_DrawString(this, &numberFont, format, 26.5, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, scale, scale); } //