diff --git a/quakespasm/Quake/glquake.h b/quakespasm/Quake/glquake.h index ff61cb11..e85dfb6b 100644 --- a/quakespasm/Quake/glquake.h +++ b/quakespasm/Quake/glquake.h @@ -284,6 +284,7 @@ typedef struct { double packetsize; double efrags; double beams; + double varstring; } overflowtimes_t; extern overflowtimes_t dev_overflows; //this stores the last time overflow messages were displayed, not the last time overflows occured #define CONSOLE_RESPAM_TIME 3 // seconds between repeated warning messages diff --git a/quakespasm/Quake/pr_cmds.c b/quakespasm/Quake/pr_cmds.c index ff886623..f650dcea 100644 --- a/quakespasm/Quake/pr_cmds.c +++ b/quakespasm/Quake/pr_cmds.c @@ -65,7 +65,13 @@ static char *PF_VarString (int first) } } if (s > 255) - Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n", (int) s, (int)(sizeof(out) - 1)); + { + if (!dev_overflows.varstring || dev_overflows.varstring + CONSOLE_RESPAM_TIME < realtime) + { + Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n", (int) s, (int)(sizeof(out) - 1)); + dev_overflows.varstring = realtime; + } + } return out; }