diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 11e304ac5..b59f52070 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -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; }