Skip to content

Commit 4f1010b

Browse files
committed
Adjust flag hud timer code slightly to more match other timer behavior
1 parent 6db8aa6 commit 4f1010b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

code/cgame/cg_newdraw.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,10 +3246,12 @@ void CG_Q3F_DrawHUDIcons(rectDef_t *rect, float tscale, vec4_t color, int textSt
32463246
w = 64 * cent->currentState.apos.trBase[0] * scale; // 64 * scale (0 to 1)
32473247
h = 64 * cent->currentState.apos.trBase[0] * scale;
32483248

3249-
t = cent->currentState.constantLight - cg.time;
3250-
if (t > 0) {
3249+
t = (cent->currentState.constantLight - cg.time)/1000;
3250+
if (t < 0)
3251+
t = 0;
3252+
if (t >= 0) {
32513253
char buf[16];
3252-
Com_sprintf(buf, sizeof(buf), "%d", (int)t/1000);
3254+
Com_sprintf(buf, sizeof(buf), "%d", t+1);
32533255
y += (h - CG_Text_Height(buf, tscale, 0, font)) / 2;
32543256

32553257
if (reverse) {

0 commit comments

Comments
 (0)