44cvar_t host_framerate = {
CF_CLIENT |
CF_SERVER,
"host_framerate",
"0",
"locks frame timing to this value in seconds, 0.05 is 20fps for example, note that this can easily run too fast, use cl_maxfps if you want to limit your framerate instead, or sys_ticrate to limit server speed"};
48cvar_t developer = {
CF_CLIENT |
CF_SERVER |
CF_ARCHIVE,
"developer",
"0",
"shows debugging messages and information (recommended for all developers and level designers); the value -1 also suppresses buffering and logging these messages"};
89 static qbool hosterror =
false;
100 va_start (argptr,
error);
112 Sys_Error (
"Host_Error: recursively entered (original error was: %s new error is: %s)", hosterrorstring2, hosterrorstring1);
115 dp_strlcpy(hosterrorstring2, hosterrorstring1,
sizeof(hosterrorstring2));
127 Sys_Error(
"Host_Error: %s", hosterrorstring1);
211 Con_Printf(
"Saving config to %s ...\n", file);
241 Cbuf_InsertText(
cmd,
"alias startmap_sp \"map start\"\nalias startmap_dm \"map start\"\nexec teu.rc\n");
346 Con_Printf(
CON_WARN "WARNING: session lock %s could not be acquired. Please run with -sessionid and an unique session name. Continuing anyway.\n", p);
350 Sys_Error(
"session lock %s could not be acquired. Please run with -sessionid and an unique session name.\n", p);
531#ifdef CONFIG_VIDEO_CAPTURE
620 double cl_wait, sv_wait;
656 return min(cl_wait, sv_wait);
void CL_DisconnectEx(qbool kicked, const char *fmt,...)
double CL_Frame(double time)
void CL_Parse_ErrorCleanUp(void)
void CL_Parse_DumpPacket(void)
void SCR_BeginLoadingPlaque(qbool startup)
void Cbuf_Clear(cmd_buf_t *cbuf)
Clears all command buffers.
void Cbuf_InsertText(cmd_state_t *cmd, const char *text)
void Cmd_SaveInitState(void)
called by Host_Init, this marks cvars, commands and aliases with their init values
void Cbuf_AddText(cmd_state_t *cmd, const char *text)
void Cmd_RestoreInitState(void)
Restores cvars, commands and aliases to their init values and deletes any that were added since init.
void Cmd_Init(void)
Command execution takes a null terminated string, breaks it into tokens, then searches for a command ...
void Cbuf_Frame(cmd_buf_t *cbuf)
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
cmd_state_t * cmd_local
command interpreter for local commands injected by SVQC, CSQC, MQC, server or client engine code uses...
void Cbuf_Execute(cmd_buf_t *cbuf)
#define CF_READONLY
cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
@ src_client
came in over a net connection as a clc_stringcmd host_client will be valid during this state.
@ src_local
from the command buffer
#define CF_SERVER
cvar/command that only the server can change/execute
static int Cmd_Argc(cmd_state_t *cmd)
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
#define CF_CLIENT
cvar/command that only the client can change/execute
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
int dpvsnprintf(char *buffer, size_t buffersize, const char *format, va_list args)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
char * va(char *buf, size_t buflen, const char *format,...)
void COM_Init_Commands(void)
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
#define dp_strlcpy(dst, src, dsize)
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void Log_DestBuffer_Flush(void)
call this once per frame to send out replies to rcon streaming clients
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
void Con_Rcon_Redirect_Abort(void)
void Crypto_Init_Commands(void)
void Crypto_Shutdown(void)
void Cvar_SetValueQuick(cvar_t *var, float value)
void Cvar_SetQuick(cvar_t *var, const char *value)
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
void Cvar_WriteVariables(cvar_state_t *cvars, qfile_t *f)
void Cvar_RegisterCallback(cvar_t *variable, void(*callback)(cvar_t *))
qfile_t * FS_SysOpen(const char *filepath, const char *mode, qbool nonblocking)
qfile_t * FS_OpenRealFile(const char *filepath, const char *mode, qbool quiet)
int FS_Close(qfile_t *file)
void FS_CreatePath(char *path)
char fs_basedir[MAX_OSPATH]
const char * FS_FileExists(const char *filename)
Look for a file in the packages and in the filesystem Returns its canonical name (same case as used i...
char fs_userdir[MAX_OSPATH]
cvar_t gl_printcheckerror
GLenum GLuint GLenum GLsizei const GLchar * buf
void Host_LockSession(void)
static void Host_InitSession(void)
char engineversion[128]
version string for the corner of the console, crash messages, status command, etc
static void Host_Version_f(cmd_state_t *cmd)
void Host_UpdateVersion(void)
static qfile_t * locksession_fh
void Host_AbortCurrentFrame(void)
void Host_Error(const char *error,...)
static void Host_SaveConfig_f(cmd_state_t *cmd)
void Host_UnlockSession(void)
static void SendCvar_f(cmd_state_t *cmd)
cvar_t r_texture_jpeg_fastpicmip
static void Host_Framerate_c(cvar_t *var)
cvar_t developer_loadfile
cvar_t developer_entityparsing
static void Host_LoadConfig_f(cmd_state_t *cmd)
static void Host_Quit_f(cmd_state_t *cmd)
static void Host_AddConfigText(cmd_state_t *cmd)
void Host_SaveConfig(const char *file)
static void Host_InitLocal(void)
static qbool locksession_run
double Host_Frame(double time)
@ host_shutdown
states >= host_shutdown cause graceful shutdown, see Sys_HandleCrash() comments
static const char *const host_state_str[]
void Key_WriteBindings(qfile_t *f)
void Curl_Init_Commands(void)
void NetConn_UpdateSockets(void)
void NetConn_Shutdown(void)
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
#define STARTCONFIGFILENAME
void R_TimeReport(const char *desc)
void SV_StartThread(void)
double SV_Frame(double time)
server_static_t svs
persistant server info
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
qbool restless
don't sleep
double dirtytime
the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
void(* CL_SendCvar)(struct cmd_state_s *)
void(* SV_Shutdown)(void)
void(* ConnectLocal)(void)
void(* SV_SendCvar)(struct cmd_state_s *)
unsigned int framecount
incremented every frame, never reset, >0 means Host_AbortCurrentFrame() is possible
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
struct host_static_t::@12 hook
void(* Disconnect)(qbool, const char *,...)
qbool active
false if only a net client
void Sys_InitProcessNice(void)
called to set process priority for dedicated servers
void Sys_Error(const char *error,...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN
Causes the entire program to exit ASAP.
void Sys_AllowProfiling(qbool enable)
void Sys_SDL_Shutdown(void)
INFO: This is only called by Host_Shutdown so we dont need testing for recursion.
void Sys_SDL_HandleEvents(void)
Perform Key_Event () callbacks until the input que is empty.
double Sys_DirtyTime(void)
void Sys_MakeProcessMean(void)
void Sys_Init_Commands(void)
called after command system is initialized but before first Con_Print
int Sys_CheckParm(const char *parm)
void TaskQueue_Frame(qbool shutdown)
void TaskQueue_Shutdown(void)
void TaskQueue_Init(void)
void Thread_Shutdown(void)
cvar_t developer_memorydebug
void Memory_Init_Commands(void)
void Memory_Shutdown(void)
#define Mem_CheckSentinelsGlobal()