Skip to content
Permalink
Browse files

cgame: fixed tapout reinforcement timer color when spectating

  • Loading branch information...
rmarquis committed Apr 14, 2019
1 parent e9e3364 commit 610f51434e87238f3c0ff341c7ba6f02eded118e
Showing with 6 additions and 3 deletions.
  1. +4 −2 src/cgame/cg_draw_hud.c
  2. +2 −1 src/cgame/cg_scoreboard.c
@@ -2150,7 +2150,8 @@ static void CG_DrawTimersAlt(rectDef_t *respawn, rectDef_t *spawntimer, rectDef_
{
int reinfTime = CG_CalculateReinfTime(qfalse);

rt = va("%s%d%s", (reinfTime <= 2 && cgs.clientinfo[cg.clientNum].health == 0) ? "^3" : "^F", reinfTime, ((cgs.timelimit <= 0.0f) ? "" : " "));
rt = va("%s%d%s", (reinfTime <= 2 && cgs.clientinfo[cg.clientNum].health == 0 &&
!(cg.snap->ps.pm_flags & PMF_FOLLOW)) ? "^3" : "^F", reinfTime, ((cgs.timelimit <= 0.0f) ? "" : " "));
}
else
{
@@ -2255,7 +2256,8 @@ static float CG_DrawTimerNormal(float y)
{
int reinfTime = CG_CalculateReinfTime(qfalse);

rt = va("%s%d%s", (reinfTime <= 2 && cgs.clientinfo[cg.clientNum].health == 0) ? "^3" : "^F", reinfTime, ((cgs.timelimit <= 0.0f) ? "" : " "));
rt = va("%s%d%s", (reinfTime <= 2 && cgs.clientinfo[cg.clientNum].health == 0 &&
!(cg.snap->ps.pm_flags & PMF_FOLLOW)) ? "^3" : "^F", reinfTime, ((cgs.timelimit <= 0.0f) ? "" : " "));
}
else
{
@@ -270,7 +270,8 @@ int WM_DrawObjectives(int x, int y, int width, float fade)
}
else
{
s = va("%s %s%i", CG_TranslateString("REINFORCE TIME:"), (seconds <= 2 && cgs.clientinfo[cg.clientNum].health == 0) ? "^3" : "^F", seconds);
s = va("%s %s%i", CG_TranslateString("REINFORCE TIME:"), (seconds <= 2 &&
cgs.clientinfo[cg.clientNum].health == 0 && !(cg.snap->ps.pm_flags & PMF_FOLLOW)) ? "^3" : "^F", seconds);
}
CG_Text_Paint_Ext(SCREEN_WIDTH - 20 - CG_Text_Width_Ext(s, 0.25f, 0, FONT_HEADER) + cgs.wideXoffset, y, 0.25f, 0.25f, SB_text, s, 0, 0, 0, FONT_HEADER);
}

0 comments on commit 610f514

Please sign in to comment.
You can’t perform that action at this time.