Fix stupid bug when scaling the chat input.

The vertical offset must be multiplied with the scale. And not the
scale added onto it... This fixes issue #306.
This commit is contained in:
Yamagi Burmeister 2018-06-25 09:41:57 +02:00
parent 091e1834eb
commit d96a46dc1f
2 changed files with 4 additions and 7 deletions

View file

@ -565,7 +565,7 @@ Con_DrawNotify(void)
x++;
}
Draw_CharScaled(((x + skip) << 3) * scale, v + scale, 10 + ((cls.realtime >> 8) & 1), scale);
Draw_CharScaled(((x + skip) << 3) * scale, v * scale, 10 + ((cls.realtime >> 8) & 1), scale);
v += 8;
}

View file

@ -1138,18 +1138,15 @@ Cmd_Say_f(edict_t *ent, qboolean team, qboolean arg0)
i = (sizeof(cl->flood_when) / sizeof(cl->flood_when[0])) + i;
}
if (cl->flood_when[i] &&
(level.time - cl->flood_when[i] < flood_persecond->value))
if (cl->flood_when[i] && (level.time - cl->flood_when[i] < flood_persecond->value))
{
cl->flood_locktill = level.time + flood_waitdelay->value;
gi.cprintf(ent, PRINT_CHAT,
"Flood protection: You can't talk for %d seconds.\n",
gi.cprintf(ent, PRINT_CHAT, "Flood protection: You can't talk for %d seconds.\n",
(int)flood_waitdelay->value);
return;
}
cl->flood_whenhead = (cl->flood_whenhead + 1) %
(sizeof(cl->flood_when) / sizeof(cl->flood_when[0]));
cl->flood_whenhead = (cl->flood_whenhead + 1) % (sizeof(cl->flood_when) / sizeof(cl->flood_when[0]));
cl->flood_when[cl->flood_whenhead] = level.time;
}