mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-14 00:50:38 +00:00
Make "exceeds standard limit of" messages only display when developer cvar is set, with a new Con_DWarning function.
Have heard these are confusing players and mappers/modders; people assume there is an error or a limit in QS is exceeded, but the messages are only about exceeding the limits in vanilla WinQuake/GLQuake. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1211 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
95e0be7afe
commit
1f3c1a711a
10 changed files with 43 additions and 17 deletions
|
@ -633,13 +633,13 @@ int CL_ReadFromServer (void)
|
||||||
|
|
||||||
//visedicts
|
//visedicts
|
||||||
if (cl_numvisedicts > 256 && dev_peakstats.visedicts <= 256)
|
if (cl_numvisedicts > 256 && dev_peakstats.visedicts <= 256)
|
||||||
Con_Warning ("%i visedicts exceeds standard limit of 256.\n", cl_numvisedicts);
|
Con_DWarning ("%i visedicts exceeds standard limit of 256.\n", cl_numvisedicts);
|
||||||
dev_stats.visedicts = cl_numvisedicts;
|
dev_stats.visedicts = cl_numvisedicts;
|
||||||
dev_peakstats.visedicts = q_max(cl_numvisedicts, dev_peakstats.visedicts);
|
dev_peakstats.visedicts = q_max(cl_numvisedicts, dev_peakstats.visedicts);
|
||||||
|
|
||||||
//temp entities
|
//temp entities
|
||||||
if (num_temp_entities > 64 && dev_peakstats.tempents <= 64)
|
if (num_temp_entities > 64 && dev_peakstats.tempents <= 64)
|
||||||
Con_Warning ("%i tempentities exceeds standard limit of 64.\n", num_temp_entities);
|
Con_DWarning ("%i tempentities exceeds standard limit of 64.\n", num_temp_entities);
|
||||||
dev_stats.tempents = num_temp_entities;
|
dev_stats.tempents = num_temp_entities;
|
||||||
dev_peakstats.tempents = q_max(num_temp_entities, dev_peakstats.tempents);
|
dev_peakstats.tempents = q_max(num_temp_entities, dev_peakstats.tempents);
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ void CL_ParseServerInfo (void)
|
||||||
|
|
||||||
//johnfitz -- check for excessive models
|
//johnfitz -- check for excessive models
|
||||||
if (nummodels >= 256)
|
if (nummodels >= 256)
|
||||||
Con_Warning ("%i models exceeds standard limit of 256.\n", nummodels);
|
Con_DWarning ("%i models exceeds standard limit of 256.\n", nummodels);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
// precache sounds
|
// precache sounds
|
||||||
|
@ -346,7 +346,7 @@ void CL_ParseServerInfo (void)
|
||||||
|
|
||||||
//johnfitz -- check for excessive sounds
|
//johnfitz -- check for excessive sounds
|
||||||
if (numsounds >= 256)
|
if (numsounds >= 256)
|
||||||
Con_Warning ("%i sounds exceeds standard limit of 256.\n", numsounds);
|
Con_DWarning ("%i sounds exceeds standard limit of 256.\n", numsounds);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1128,7 +1128,7 @@ void CL_ParseServerMessage (void)
|
||||||
if (i == 2)
|
if (i == 2)
|
||||||
{
|
{
|
||||||
if (cl.num_statics > 128)
|
if (cl.num_statics > 128)
|
||||||
Con_Warning ("%i static entities exceeds standard limit of 128.\n", cl.num_statics);
|
Con_DWarning ("%i static entities exceeds standard limit of 128.\n", cl.num_statics);
|
||||||
R_CheckEfrags ();
|
R_CheckEfrags ();
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
|
@ -519,6 +519,31 @@ void Con_Printf (const char *fmt, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
Con_DWarning -- ericw
|
||||||
|
|
||||||
|
same as Con_Warning, but only prints if "developer" cvar is set.
|
||||||
|
use for "exceeds standard limit of" messages, which are only relevant for developers
|
||||||
|
targetting vanilla engines
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
void Con_DWarning (const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list argptr;
|
||||||
|
char msg[MAXPRINTMSG];
|
||||||
|
|
||||||
|
if (!developer.value)
|
||||||
|
return; // don't confuse non-developers with techie stuff...
|
||||||
|
|
||||||
|
va_start (argptr, fmt);
|
||||||
|
q_vsnprintf (msg, sizeof(msg), fmt, argptr);
|
||||||
|
va_end (argptr);
|
||||||
|
|
||||||
|
Con_SafePrintf ("\x02Warning: ");
|
||||||
|
Con_Printf ("%s", msg);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
Con_Warning -- johnfitz -- prints a warning to the console
|
Con_Warning -- johnfitz -- prints a warning to the console
|
||||||
|
|
|
@ -40,6 +40,7 @@ void Con_CheckResize (void);
|
||||||
void Con_Init (void);
|
void Con_Init (void);
|
||||||
void Con_DrawConsole (int lines, qboolean drawinput);
|
void Con_DrawConsole (int lines, qboolean drawinput);
|
||||||
void Con_Printf (const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
|
void Con_Printf (const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
|
||||||
|
void Con_DWarning (const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); //ericw
|
||||||
void Con_Warning (const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); //johnfitz
|
void Con_Warning (const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); //johnfitz
|
||||||
void Con_DPrintf (const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
|
void Con_DPrintf (const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
|
||||||
void Con_DPrintf2 (const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); //johnfitz
|
void Con_DPrintf2 (const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); //johnfitz
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ void Mod_LoadFaces (lump_t *l, qboolean bsp2)
|
||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767 && !bsp2)
|
if (count > 32767 && !bsp2)
|
||||||
Con_Warning ("%i faces exceeds standard limit of 32767.\n", count);
|
Con_DWarning ("%i faces exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->surfaces = out;
|
loadmodel->surfaces = out;
|
||||||
|
@ -1240,7 +1240,7 @@ void Mod_LoadNodes_S (lump_t *l)
|
||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767)
|
if (count > 32767)
|
||||||
Con_Warning ("%i nodes exceeds standard limit of 32767.\n", count);
|
Con_DWarning ("%i nodes exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->nodes = out;
|
loadmodel->nodes = out;
|
||||||
|
@ -1591,7 +1591,7 @@ void Mod_LoadClipnodes (lump_t *l, qboolean bsp2)
|
||||||
|
|
||||||
//johnfitz -- warn about exceeding old limits
|
//johnfitz -- warn about exceeding old limits
|
||||||
if (count > 32767 && !bsp2)
|
if (count > 32767 && !bsp2)
|
||||||
Con_Warning ("%i clipnodes exceeds standard limit of 32767.\n", count);
|
Con_DWarning ("%i clipnodes exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->clipnodes = out;
|
loadmodel->clipnodes = out;
|
||||||
|
@ -1745,7 +1745,7 @@ void Mod_LoadMarksurfaces (lump_t *l, int bsp2)
|
||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767)
|
if (count > 32767)
|
||||||
Con_Warning ("%i marksurfaces exceeds standard limit of 32767.\n", count);
|
Con_DWarning ("%i marksurfaces exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
for (i=0 ; i<count ; i++)
|
for (i=0 ; i<count ; i++)
|
||||||
|
@ -1880,7 +1880,7 @@ void Mod_LoadSubmodels (lump_t *l)
|
||||||
Sys_Error ("Mod_LoadSubmodels: too many visleafs (%d, max = %d) in %s", out->visleafs, MAX_MAP_LEAFS, loadmodel->name);
|
Sys_Error ("Mod_LoadSubmodels: too many visleafs (%d, max = %d) in %s", out->visleafs, MAX_MAP_LEAFS, loadmodel->name);
|
||||||
|
|
||||||
if (out->visleafs > 8192)
|
if (out->visleafs > 8192)
|
||||||
Con_Warning ("%i visleafs exceeds standard limit of 8192.\n", out->visleafs);
|
Con_DWarning ("%i visleafs exceeds standard limit of 8192.\n", out->visleafs);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ void R_CheckEfrags (void)
|
||||||
;
|
;
|
||||||
|
|
||||||
if (count > 640 && dev_peakstats.efrags <= 640)
|
if (count > 640 && dev_peakstats.efrags <= 640)
|
||||||
Con_Warning ("%i efrags exceeds standard limit of 640.\n", count);
|
Con_DWarning ("%i efrags exceeds standard limit of 640.\n", count);
|
||||||
|
|
||||||
dev_stats.efrags = count;
|
dev_stats.efrags = count;
|
||||||
dev_peakstats.efrags = q_max(count, dev_peakstats.efrags);
|
dev_peakstats.efrags = q_max(count, dev_peakstats.efrags);
|
||||||
|
|
|
@ -654,7 +654,7 @@ void Host_ServerFrame (void)
|
||||||
active++;
|
active++;
|
||||||
}
|
}
|
||||||
if (active > 600 && dev_peakstats.edicts <= 600)
|
if (active > 600 && dev_peakstats.edicts <= 600)
|
||||||
Con_Warning ("%i edicts exceeds standard limit of 600.\n", active);
|
Con_DWarning ("%i edicts exceeds standard limit of 600.\n", active);
|
||||||
dev_stats.edicts = active;
|
dev_stats.edicts = active;
|
||||||
dev_peakstats.edicts = q_max(active, dev_peakstats.edicts);
|
dev_peakstats.edicts = q_max(active, dev_peakstats.edicts);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ static char *PF_VarString (int first)
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s > 255 && developer.value)
|
if (s > 255)
|
||||||
Con_Warning("PF_VarString: %i characters exceeds standard limit of 255.\n", (int) s);
|
Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255.\n", (int) s);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -947,7 +947,7 @@ void GL_BuildLightmaps (void)
|
||||||
|
|
||||||
//johnfitz -- warn about exceeding old limits
|
//johnfitz -- warn about exceeding old limits
|
||||||
if (i >= 64)
|
if (i >= 64)
|
||||||
Con_Warning ("%i lightmaps exceeds standard limit of 64.\n", i);
|
Con_DWarning ("%i lightmaps exceeds standard limit of 64.\n", i);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -700,7 +700,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
||||||
//johnfitz -- devstats
|
//johnfitz -- devstats
|
||||||
stats:
|
stats:
|
||||||
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
||||||
Con_Warning ("%i byte packet exceeds standard limit of 1024.\n", msg->cursize);
|
Con_DWarning ("%i byte packet exceeds standard limit of 1024.\n", msg->cursize);
|
||||||
dev_stats.packetsize = msg->cursize;
|
dev_stats.packetsize = msg->cursize;
|
||||||
dev_peakstats.packetsize = q_max(msg->cursize, dev_peakstats.packetsize);
|
dev_peakstats.packetsize = q_max(msg->cursize, dev_peakstats.packetsize);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
@ -1422,7 +1422,7 @@ void SV_SpawnServer (const char *server)
|
||||||
|
|
||||||
//johnfitz -- warn if signon buffer larger than standard server can handle
|
//johnfitz -- warn if signon buffer larger than standard server can handle
|
||||||
if (sv.signon.cursize > 8000-2) //max size that will fit into 8000-sized client->message buffer with 2 extra bytes on the end
|
if (sv.signon.cursize > 8000-2) //max size that will fit into 8000-sized client->message buffer with 2 extra bytes on the end
|
||||||
Con_Warning ("%i byte signon buffer exceeds standard limit of 7998.\n", sv.signon.cursize);
|
Con_DWarning ("%i byte signon buffer exceeds standard limit of 7998.\n", sv.signon.cursize);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
// send serverinfo to all connected clients
|
// send serverinfo to all connected clients
|
||||||
|
|
Loading…
Reference in a new issue