- improve message spam prevention.

This commit is contained in:
Christoph Oelckers 2020-07-30 21:09:11 +02:00
parent 6980c64f7b
commit 0ac11955df
2 changed files with 4 additions and 6 deletions

View file

@ -147,12 +147,10 @@ void FTA(int q, struct player_struct* p)
if (hud_messages == 0 || q < 0 || !(p->gm & MODE_GAME))
return;
if (p->ftq != q)
if (p->ftq != q || totalclock - p->ftt > TICRATE)
{
if (q == QUOTE_DEAD || q == QUOTE_SQUISHED || q == QUOTE_BOOTS_ON)
{
p->ftq = q;
}
p->ftq = q;
p->ftt = totalclock;
auto qu = quoteMgr.GetQuote(q);
if (p == &ps[screenpeek] && qu[0] != '\0')
{

View file

@ -125,7 +125,7 @@ struct player_struct
int bobcounter, weapon_sway;
int pals_time, randomflamex, crack_time;
int aim_mode, auto_aim;
int aim_mode, auto_aim, ftt;
short cursectnum, last_extra, subweapon;
short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself;