*/
void Con_DPrint(const char *msg)
{
+ if(developer.integer < 0) // at 0, we still add to the buffer but hide
+ return;
+
Con_MaskPrint(CON_MASK_DEVELOPER, msg);
}
va_list argptr;
char msg[MAX_INPUTLINE];
+ if(developer.integer < 0) // at 0, we still add to the buffer but hide
+ return;
+
va_start(argptr,fmt);
dpvsnprintf(msg,sizeof(msg),fmt,argptr);
va_end(argptr);
void Con_DrawConsole (int lines)
{
int mask_must = 0;
- int mask_mustnot = developer.integer ? 0 : CON_MASK_DEVELOPER;
+ int mask_mustnot = (developer.integer>0) ? 0 : CON_MASK_DEVELOPER;
cachepic_t *conbackpic;
if (lines <= 0)
cvar_t cl_maxfps_alwayssleep = {0, "cl_maxfps_alwayssleep","1", "gives up some processing time to other applications each frame, value in milliseconds, disabled if cl_maxfps is 0"};
cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"};
-cvar_t developer = {CVAR_SAVE, "developer","0", "prints debugging messages and information (recommended for all developers and level designers)"};
+cvar_t developer = {CVAR_SAVE, "developer","0", "shows debugging messages and information (recommended for all developers and level designers); the value -1 also suppresses buffering and logging these messages"};
cvar_t developer_extra = {0, "developer_extra", "0", "prints additional debugging messages, often very verbose!"};
cvar_t developer_insane = {0, "developer_insane", "0", "prints huge streams of information about internal workings, entire contents of files being read/written, etc. Not recommended!"};
cvar_t developer_loadfile = {0, "developer_loadfile","0", "prints name and size of every file loaded via the FS_LoadFile function (which is almost everything)"};
for(di = downloads; di; di = di->next)
{
// do not show infobars for background downloads
- if(!developer.integer)
+ if(developer.integer <= 0)
if(di->buffer)
continue;
strlcpy(downinfo[i].filename, di->filename, sizeof(downinfo[i].filename));
ed = PRVM_G_EDICT(OFS_PARM0);
if( PRVM_NUM_FOR_EDICT(ed) <= prog->reserved_edicts )
{
- if (developer.integer)
+ if (developer.integer > 0)
VM_Warning( "VM_remove: tried to remove the null entity or a reserved entity!\n" );
}
else if( ed->priv.required->free )
{
- if (developer.integer)
+ if (developer.integer > 0)
VM_Warning( "VM_remove: tried to remove an already freed entity!\n" );
}
else
}
else
{
- if (developer.integer) // don't confuse non-developers with errors
+ if (developer.integer > 0) // don't confuse non-developers with errors
{
Con_Print("No spawn function for:\n");
PRVM_ED_Print(ent, NULL);
// free q3 shaders so that any newly downloaded shaders will be active
Mod_FreeQ3Shaders();
- worldmodel = Mod_ForName(modelname, false, developer.integer != 0, NULL);
+ worldmodel = Mod_ForName(modelname, false, developer.integer > 0, NULL);
if (!worldmodel || !worldmodel->TraceBox)
{
Con_Printf("Couldn't load map %s\n", modelname);
clc_stringcmd_invalid:
Con_Printf("Received invalid stringcmd from %s\n", host_client->name);
- if(developer.integer)
+ if(developer.integer > 0)
Com_HexDumpToConsole((unsigned char *) s, strlen(s));
break;
Sys_Error("Mem_Alloc: pool == NULL (alloc at %s:%i)", filename, fileline);
if (developer_memory.integer)
Con_DPrintf("Mem_Alloc: pool %s, file %s:%i, size %i bytes\n", pool->name, filename, fileline, (int)size);
- //if (developer.integer && developer_memorydebug.integer)
+ //if (developer.integer > 0 && developer_memorydebug.integer)
// _Mem_CheckSentinelsGlobal(filename, fileline);
pool->totalsize += size;
realsize = alignment + sizeof(memheader_t) + size + sizeof(sentinel2);