color ping numbers for color hud
This commit is contained in:
1 parent
6d977ea949
commit
980d59c9be
1 file changed
+21
-4
+21
-4
@@ -2356,21 +2356,38 @@ Ping_gfx_num (int lag)
|
||||
return 4;
|
||||
}
|
||||
|
||||
static int
|
||||
Ping_gfx_color (int lag)
|
||||
{
|
||||
if (lag < 2)
|
||||
return SKINCOLOR_JAWZ;
|
||||
else if (lag < 4)
|
||||
return SKINCOLOR_MINT;
|
||||
else if (lag < 7)
|
||||
return SKINCOLOR_GOLD;
|
||||
else if (lag < 10)
|
||||
return SKINCOLOR_RED;
|
||||
else
|
||||
return SKINCOLOR_WHITE; // SKINCOLOR_MAGENTA
|
||||
}
|
||||
|
||||
static const UINT8 *
|
||||
Ping_gfx_colormap (UINT32 lag, boolean gentleman)
|
||||
{
|
||||
const UINT8 *colormap = NULL;
|
||||
|
||||
if (gentleman)
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PASTEL, GTC_CACHE);
|
||||
}
|
||||
if (K_UseColorHud())
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, Ping_gfx_color(lag), GTC_CACHE);
|
||||
|
||||
if (servermaxping && lag > servermaxping && hu_tick < 4)
|
||||
{
|
||||
// flash ping red if too high
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_RASPBERRY, GTC_CACHE);
|
||||
}
|
||||
else if (gentleman)
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PASTEL, GTC_CACHE);
|
||||
}
|
||||
|
||||
return colormap;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user