From 439c26b18b1148525eb04188401b35cfc7d34c1f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 27 Apr 2000 04:33:30 +0000 Subject: [PATCH] developer 1 will cause +... output when things are executed Also, move the developer cvar to it's new home in cvar.c and cvars.h --- common/cl_main.c | 2 -- common/cmd.c | 4 ++-- common/common_quakedef.h | 1 - common/cvar.c | 5 +++++ common/cvars.h | 1 + common/server.h | 1 - qw_server/sv_main.c | 4 ---- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/common/cl_main.c b/common/cl_main.c index 822a51f..c6e9c05 100644 --- a/common/cl_main.c +++ b/common/cl_main.c @@ -189,7 +189,6 @@ netadr_t master_adr; // address of the master server cvar_t *host_speeds; cvar_t *show_fps; -cvar_t *developer; void Master_Connect_f (void); @@ -1726,7 +1725,6 @@ void CL_InitCvars() // host_speeds = Cvar_Get ("host_speeds","0",0,"None"); show_fps = Cvar_Get ("show_fps","0",0,"None"); - developer = Cvar_Get ("developer","0",0,"None"); sys_nostdout = Cvar_Get ("sys_nostdout","0",0,"None"); cl_warncmd = Cvar_Get ("cl_warncmd","0",0,"None"); diff --git a/common/cmd.c b/common/cmd.c index 15e040d..e75acc4 100644 --- a/common/cmd.c +++ b/common/cmd.c @@ -201,7 +201,7 @@ Cbuf_Execute (void) while (cmd_text.cursize) { extract_line (line); // execute the command line - printf("+%s\n",line), + Con_DPrintf("+%s\n",line), Cmd_ExecuteString (line, src_command); if (cmd_wait) @@ -227,7 +227,7 @@ Cbuf_Execute_Sets (void) // execute the command line if (strncmp(line,"set",3)==0 && isspace(line[3])) - printf("+%s\n",line), + Con_DPrintf("+%s\n",line), Cmd_ExecuteString (line, src_command); } } diff --git a/common/common_quakedef.h b/common/common_quakedef.h index 577fc7a..577f723 100644 --- a/common/common_quakedef.h +++ b/common/common_quakedef.h @@ -93,7 +93,6 @@ extern quakeparms_t host_parms; extern cvar_t *sys_ticrate; extern cvar_t *sys_nostdout; -extern cvar_t *developer; extern qboolean host_initialized;// true if into command execution extern double host_frametime; diff --git a/common/cvar.c b/common/cvar.c index bf95ebb..61164d6 100644 --- a/common/cvar.c +++ b/common/cvar.c @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #if defined(UQUAKE) || defined(SERVERONLY) @@ -48,6 +50,7 @@ cvar_t *cvar_vars; char *cvar_null_string = ""; +cvar_t *developer; /* ============ @@ -319,6 +322,8 @@ void Cvar_CvarList_f (void) void Cvar_Init() { + developer = Cvar_Get ("developer","0",0,"None"); + Cmd_AddCommand ("set", Cvar_Set_f); Cmd_AddCommand ("toggle", Cvar_Toggle_f); Cmd_AddCommand ("help",Cvar_Help_f); diff --git a/common/cvars.h b/common/cvars.h index 6d3e61f..475835e 100644 --- a/common/cvars.h +++ b/common/cvars.h @@ -53,5 +53,6 @@ extern cvar_t *r_numsurfs; extern cvar_t *r_reportedgeout; extern cvar_t *r_maxedges; extern cvar_t *r_numedges; +extern cvar_t *developer; #endif /* _CVARS_H */ diff --git a/common/server.h b/common/server.h index c6fec6f..ff92800 100644 --- a/common/server.h +++ b/common/server.h @@ -557,7 +557,6 @@ void ClientReliableWrite_SZ(client_t *cl, void *data, int len); extern quakeparms_t host_parms; extern cvar_t *sys_nostdout; -extern cvar_t *developer; extern qboolean host_initialized; // true if into command execution extern double host_frametime; diff --git a/qw_server/sv_main.c b/qw_server/sv_main.c index 2129f65..5589d85 100644 --- a/qw_server/sv_main.c +++ b/qw_server/sv_main.c @@ -54,8 +54,6 @@ cvar_t *sv_maxrate; cvar_t *sv_mintic; cvar_t *sv_maxtic; -cvar_t *developer; - cvar_t *timeout; cvar_t *zombietime; // after disconnect @@ -353,7 +351,6 @@ void SV_FullClientUpdateToClient (client_t *client, client_t *cl) void SV_InitCvars () { - developer = Cvar_Get ("developer","0",0,"None"); sys_nostdout = Cvar_Get ("sys_nostdout","0",0,"None"); cl_warncmd = Cvar_Get ("cl_warncmd","0",0,"None"); @@ -1386,7 +1383,6 @@ void SV_InitLocal (void) "None"); sv_maxrate = Cvar_Get ("sv_maxrate","0",0,"None"); - developer = Cvar_Get ("developer","0",0,"None"); timeout = Cvar_Get ("timeout","65",0,"None"); zombietime = Cvar_Get ("zombietime","2",0,"None");