This file can stub out the entire client system for pure dedicated servers. More...
#include "../common/common.h"
#include "../ports/system.h"
Go to the source code of this file.
Functions | |
void | CL_Init (void) |
void | CL_InitAfter (void) |
Init function for clients - called after menu was initialized and ufo-scripts were parsed. | |
void | CL_Drop (void) |
Ensures the right menu cvars are set after error drop or map change. | |
void | Con_Print (const char *txt) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window. | |
void | CL_Shutdown (void) |
Saves configuration file and shuts the client systems down. | |
void | CL_Frame (int now, void *data) |
void | CL_SlowFrame (int now, void *data) |
void | CL_ParseClientData (const char *type, const char *name, const char **text) |
Called at client startup. | |
void | Cmd_ForwardToServer (void) |
adds the current command line as a clc_stringcmd to the client message. things like action, turn, etc, are commands directed to the server, so when they are typed in at the console, they will need to be forwarded. | |
void | SCR_BeginLoadingPlaque (void) |
void | SCR_EndLoadingPlaque (void) |
int | CL_Milliseconds (void) |
void | Key_Init (void) |
This file can stub out the entire client system for pure dedicated servers.
Definition in file sv_clientstub.c.
void CL_Drop | ( | void | ) |
Ensures the right menu cvars are set after error drop or map change.
Definition at line 39 of file sv_clientstub.c.
References CL_Disconnect(), GAME_Drop(), and SCR_EndLoadingPlaque().
void CL_Frame | ( | int | now, | |
void * | data | |||
) |
Definition at line 51 of file sv_clientstub.c.
References ca_connected, cl, CL_CameraMove(), CL_ParticleRun(), CL_ReadPackets(), CL_RunHTTPDownloads(), CL_RunMapParticles(), CL_SendCommand(), client_static_s::framerate, client_static_s::frametime, GAME_Frame(), IN_Frame(), LE_Think(), cvar_s::modified, client_static_s::realtime, S_Frame(), SCR_RunConsole(), SCR_UpdateScreen(), client_static_s::state, sys_affinity, Sys_Milliseconds(), sys_priority, and Sys_SetAffinityAndPriority().
void CL_Init | ( | void | ) |
Definition at line 31 of file sv_clientstub.c.
References BASEDIRNAME, CIN_Init(), CL_ClearState(), CL_InitLocal(), CL_InitMemPools(), CL_InitParticles(), CL_ViewInit(), Com_DPrintf(), Com_sprintf(), Con_Init(), Cvar_Get(), DEBUG_CLIENT, FS_GetCwd(), cvar_s::integer, Irc_Init(), MAX_OSPATH, Mem_TouchGlobal, Q_strncpyz(), S_Init(), SCR_Init(), cvar_s::string, sv_dedicated, TEXT_DOMAIN, and VID_Init().
void CL_InitAfter | ( | void | ) |
Init function for clients - called after menu was initialized and ufo-scripts were parsed.
Definition at line 35 of file sv_clientstub.c.
References CL_LanguageInit(), CL_TeamDefInitMenu(), CL_VideoInitMenu(), CL_ViewPrecacheModels(), Com_MapDefSort(), IN_JoystickInitMenu(), cvar_s::integer, client_static_s::mds, client_static_s::numMDs, S_Frame(), S_LoadSamples(), and sv_dedicated.
int CL_Milliseconds | ( | void | ) |
Definition at line 79 of file sv_clientstub.c.
References client_static_s::realtime, and Sys_Milliseconds().
void CL_ParseClientData | ( | const char * | type, | |
const char * | name, | |||
const char ** | text | |||
) |
Called at client startup.
Definition at line 59 of file sv_clientstub.c.
References CL_ParseCustomSkin(), CL_ParseLanguages(), CL_ParseMapDefinition(), CL_ParseParticle(), CL_ParseSequence(), CL_ParseTipsOfTheDay(), M_ParseMusic(), TUT_ParseTutorials(), UI_ParseComponent(), UI_ParseFont(), UI_ParseIcon(), UI_ParseUIModel(), and UI_ParseWindow().
void CL_Shutdown | ( | void | ) |
Saves configuration file and shuts the client systems down.
Sys_Quit
and Com_Error
. It would be better to run quit through here before the final handoff to the sys code. Definition at line 47 of file sv_clientstub.c.
References CIN_Shutdown(), CL_HTTP_Cleanup(), Con_SaveConsoleHistory(), GAME_NONE, GAME_SetMode(), Irc_Shutdown(), Key_WriteBindings(), qfalse, qtrue, R_Shutdown(), S_Shutdown(), and UI_Shutdown().
void CL_SlowFrame | ( | int | now, | |
void * | data | |||
) |
Definition at line 55 of file sv_clientstub.c.
References CL_LanguageTryToSet(), HUD_Update(), Irc_Logic_Frame(), cvar_s::modified, s_language, and cvar_s::string.
void Cmd_ForwardToServer | ( | void | ) |
adds the current command line as a clc_stringcmd to the client message. things like action, turn, etc, are commands directed to the server, so when they are typed in at the console, they will need to be forwarded.
adds the current command line as a clc_stringcmd to the client message. things like godmode, noclip, etc, are commands directed to the server, so when they are typed in at the console, they will need to be forwarded.
Definition at line 63 of file sv_clientstub.c.
References ca_connected, clc_stringcmd, Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Com_Printf(), dbuffer_add(), NET_WriteByte(), NET_WriteMsg(), client_static_s::netStream, new_dbuffer(), and client_static_s::state.
void Con_Print | ( | const char * | txt | ) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window.
Definition at line 43 of file sv_clientstub.c.
References CL_Milliseconds(), Con_Linefeed(), CONSOLE_COLORED_TEXT_MASK, console_t::currentLine, console_t::initialized, console_t::lineWidth, NUM_CON_TIMES, console_t::pos, qfalse, console_t::text, console_t::times, and console_t::totalLines.
void Key_Init | ( | void | ) |
Definition at line 84 of file sv_clientstub.c.
References Cmd_AddCommand(), Cmd_AddParamCompleteFunction(), Cmd_Dummy_f(), CONSOLE_COLORED_TEXT_MASK, CONSOLE_PROMPT_CHAR, i, Key_Bind_f(), Key_Bindlist_f(), Key_CompleteKeyName(), Key_Unbind_f(), Key_Unbindall_f(), Key_WriteBindings_f(), keyLinePos, keyLines, and MAXKEYLINES.
void SCR_BeginLoadingPlaque | ( | void | ) |
Definition at line 71 of file sv_clientstub.c.
References CL_Milliseconds(), cls, client_static_s::disableScreen, SCR_UpdateScreen(), and screenDrawLoading.
void SCR_EndLoadingPlaque | ( | void | ) |
Definition at line 75 of file sv_clientstub.c.
References cls, Con_ClearNotify(), client_static_s::disableScreen, SCR_DrawLoading(), and screenDrawLoading.