sv_clientstub.c File Reference

This file can stub out the entire client system for pure dedicated servers. More...

#include "../common/common.h"
#include "../ports/system.h"
Include dependency graph for sv_clientstub.c:

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)

Detailed Description

This file can stub out the entire client system for pure dedicated servers.

Todo:
Calls to functions not required by the dedicated server should be surrounded by the DEDICATED_ONLY macro.

Definition in file sv_clientstub.c.


Function Documentation

void CL_Drop ( void   ) 

Ensures the right menu cvars are set after error drop or map change.

Note:
E.g. called after an ERR_DROP was thrown
See also:
CL_Disconnect
SV_Map

Definition at line 39 of file sv_clientstub.c.

References CL_Disconnect(), GAME_Drop(), and SCR_EndLoadingPlaque().

void CL_Frame ( int  now,
void *  data 
)
void CL_Init ( void   ) 
void CL_InitAfter ( void   ) 

Init function for clients - called after menu was initialized and ufo-scripts were parsed.

See also:
Qcommon_Init

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.

Note:
not called for dedicated servers parses all *.ufos that are needed for single- and multiplayer
See also:
Com_ParseScripts
CL_ParseScriptSecond
CL_ParseScriptFirst
Note:
Nothing here should depends on items, equipments, actors and all other entities that are parsed in Com_ParseScripts (because maybe items are not parsed but e.g. techs would need those parsed items - thus we have to parse e.g. techs at a later stage)
This data is persistent until you shutdown the game

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.

Todo:
this is a callback from Sys_Quit and Com_Error. It would be better to run quit through here before the final handoff to the sys code.
See also:
Sys_Quit
CL_Init

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 
)
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.

See also:
Sys_ConsoleOutput

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   ) 
void SCR_BeginLoadingPlaque ( void   ) 
void SCR_EndLoadingPlaque ( void   ) 

Generated by  doxygen 1.6.2