Skip to content

Commit

Permalink
Rainbow HUD: Fix invisible text color
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 authored and YaLTeR committed Jun 3, 2021
1 parent 1523bcf commit 93f980a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cl_dll/rainbow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ void CRainbow::SPR_DrawAdditiveRainbow(int frame, int x, int y, const rect_s *pr

int CRainbow::DrawString(int x, int y, const char *str, int r, int g, int b)
{
return DrawRainbowString(x, y, str, gHUD.m_Rainbow.m_pfnDrawString);
if (r == 0 && g == 0 && b == 0)
{
// Draw invisible text without rainbow color
return gHUD.m_Rainbow.m_pfnDrawString(x, y, str, r, g, b);
}
else
{
return DrawRainbowString(x, y, str, gHUD.m_Rainbow.m_pfnDrawString);
}
}

int CRainbow::DrawStringReverse(int x, int y, const char *str, int r, int g, int b)
Expand Down

0 comments on commit 93f980a

Please sign in to comment.