Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
◆ override_entity_string()
static void override_entity_string |
( |
const char * |
server | ) |
|
|
static |
Definition at line 90 of file init.c.
93 char buffer[MAX_QPATH], *str;
100 len =
Q_concat(buffer,
sizeof(buffer), path, server,
".ent", NULL);
101 if (len >=
sizeof(buffer)) {
102 len = Q_ERR_NAMETOOLONG;
108 if (len == Q_ERR_NOENT) {
114 if (len > MAX_MAP_ENTSTRING) {
119 Com_Printf(
"Loaded entity string from %s\n", buffer);
126 Com_EPrintf(
"Couldn't load entity string from %s: %s\n",
Referenced by SV_SpawnServer().
◆ resolve_masters()
Definition at line 60 of file init.c.
70 delta =
m->adr.port ? 24 * 60 * 60 : 3 * 60 * 60;
71 if (now < m->last_resolved) {
72 m->last_resolved = now;
75 if (now -
m->last_resolved < delta) {
81 Com_WPrintf(
"Couldn't resolve master: %s\n",
m->name);
84 m->last_resolved = now = time(NULL);
Referenced by SV_SpawnServer().
◆ set_frame_time()
Definition at line 40 of file init.c.
46 framediv = sv_fps->integer / BASE_FRAMERATE;
50 clamp(framediv, 1, MAX_FRAMEDIV);
52 sv.framerate = framediv * BASE_FRAMERATE;
53 sv.frametime = BASE_FRAMETIME / framediv;
54 sv.framediv = framediv;
Referenced by SV_SpawnServer().
◆ SV_ClientReset()
◆ SV_InitGame()
void SV_InitGame |
( |
unsigned |
mvd_spawn | ) |
|
Definition at line 361 of file init.c.
369 SV_Shutdown(
"Server restarted\n", ERR_RECONNECT | mvd_spawn);
377 memset(&
sv, 0,
sizeof(
sv));
381 sv.frametime = BASE_FRAMETIME;
398 Com_Printf(
"Deathmatch and Coop both set, disabling Coop\n");
421 Cvar_FullSet(
"maxclients",
"1", CVAR_SERVERINFO | CVAR_LATCH, FROM_CODE);
442 svs.z.zalloc = SV_zalloc;
443 svs.z.zfree = SV_zfree;
444 if (deflateInit2(&
svs.z, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
445 -MAX_WBITS, 9, Z_DEFAULT_STRATEGY) != Z_OK) {
446 Com_Error(ERR_FATAL,
"%s: deflateInit2() failed", __func__);
469 ent->s.number = entnum;
Referenced by MVD_ChangeLevel(), MVD_Spawn_f(), parse_hello(), read_server_file(), and SV_Map().
◆ SV_ParseMapCmd()
qboolean SV_ParseMapCmd |
( |
mapcmd_t * |
cmd | ) |
|
Definition at line 285 of file init.c.
287 char expanded[MAX_QPATH];
305 Cvar_Set(
"nextserver",
va(
"gamemap \"%s\"", ch + 1));
322 if (!COM_CompareExtension(s,
".pcx")) {
323 len =
Q_concat(expanded,
sizeof(expanded),
"pics/", s, NULL);
324 if (len >=
sizeof(expanded)) {
325 ret = Q_ERR_NAMETOOLONG;
327 ret = FS_LoadFile(expanded, NULL);
331 else if (!COM_CompareExtension(s,
".cin")) {
333 cmd->
state = ss_cinematic;
336 len =
Q_concat(expanded,
sizeof(expanded),
"maps/", s,
".bsp", NULL);
337 if (len >=
sizeof(expanded)) {
338 ret = Q_ERR_NAMETOOLONG;
342 cmd->
state = ss_game;
346 Com_Printf(
"Couldn't load %s: %s\n", expanded,
Q_ErrorString(ret));
Referenced by read_server_file(), and SV_Map().
◆ SV_SpawnServer()
Definition at line 139 of file init.c.
147 Com_Printf(
"------- Server Initialization -------\n");
148 Com_Printf(
"SpawnServer: %s\n", cmd->
server);
150 static qboolean warning_printed = qfalse;
153 Com_Printf(
"\nWARNING: Dedicated coop servers save game state into the same place as single player game by default (currently '%s/%s'). "
154 "To override that, set the 'sv_savedir' console variable. To host multiple dedicated coop servers on one machine, set that cvar "
155 "to different values on different instances of the server.\n\n",
fs_gamedir,
Cvar_WeakGet(
"sv_savedir")->
string);
157 warning_printed = qtrue;
174 memset(&
sv, 0,
sizeof(
sv));
202 if (cmd->
state == ss_game) {
210 for (i = 1; i <
sv.
cm.cache->nummodels; i++) {
269 SV_SetConsoleTitle();
274 Com_Printf(
"-------------------------------------\n");
Referenced by read_server_file(), and SV_Map().
◆ sv
Definition at line 22 of file init.c.
Referenced by create_baselines(), emit_frame(), emit_gamestate(), MVD_ChangeLevel(), MVD_Frame(), MVD_GameInit(), MVD_Spawn(), override_entity_string(), parse_hello(), PF_AreasConnected(), PF_configstring(), PF_FindIndex(), PF_inVIS(), PF_LinkEdict(), PF_SetAreaPortalState(), PF_setmodel(), PF_StartSound(), print_drop_reason(), Qcommon_Frame(), read_level_file(), set_frame_time(), should_really_restart(), SV_AutoSaveBegin(), SV_AutoSaveEnd(), SV_BuildClientFrame(), SV_CalcPings(), SV_ClearWorld(), SV_DumpEnts_f(), SV_ExecuteUserCommand(), SV_Frame(), SV_GiveMsec(), SV_HullForEntity(), SV_Init(), SV_InitGame(), SV_LinkEdict(), SV_Map(), SV_Multicast(), SV_MvdRecord_f(), SV_New_f(), SV_NextServer_f(), SV_PointContents(), SV_PrepWorldFrame(), SV_RateDrop(), SV_RemoveClient(), SV_Savegame_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), SV_Trace(), SV_UserinfoChanged(), SVC_DirectConnect(), SVC_Info(), write_level_file(), and write_server_file().
◆ svs
Definition at line 21 of file init.c.
Referenced by AC_CheckTimeouts(), AC_ClientQuery(), AC_Info_f(), AC_Invalidate_f(), AC_List_f(), AC_ParseClient(), AC_ParseMessage(), AC_ParseReady(), AC_ParseViolation(), AC_SendPing(), AC_Update_f(), accept_client(), check_clients_activity(), check_entity(), check_players_activity(), check_reconnect(), check_timeouts(), compress_message(), drop_client(), dummy_create(), dummy_find_slot(), dummy_run(), dummy_spawn(), dump_clients(), dump_time(), filter_unicast_data(), find_client_slot(), get_last_frame(), gtv_drop(), init_rate_limits(), MVD_Connect_f(), mvd_enable(), MVD_GameClientBegin(), MVD_GameClientCommand(), MVD_GameClientConnect(), MVD_GameClientThink(), MVD_GameInit(), MVD_LayoutChannels(), MVD_LayoutClients(), MVD_LayoutFollow(), MVD_LayoutMenu(), MVD_LayoutScores(), MVD_ListServers_f(), MVD_NotifyClient(), MVD_PartFilter(), MVD_RemoveClient(), MVD_Say_f(), MVD_TrySwitchChannel(), MVD_UpdateClient(), MVD_UpdateLayouts(), parse_message(), parse_userinfo(), permit_connection(), PF_cprintf(), PF_Unicast(), player_is_active(), rec_start(), run_connect(), set_mvd_active(), sv_auth_limit_changed(), SV_BuildClientFrame(), SV_CalcSendTime(), SV_CheckTimeouts(), SV_ClientThink(), SV_ConnectionlessPacket(), SV_ConSay_f(), SV_DropClient(), SV_DumpUser_f(), SV_EmitPacketEntities(), SV_ExecuteUserCommand(), SV_Frame(), SV_GetPlayer(), SV_Heartbeat_f(), SV_InitGame(), SV_Kick_f(), SV_KillServer_f(), SV_ListMasters_f(), SV_MasterHeartbeat(), SV_MvdRunClients(), SV_New_f(), SV_PacketEvent(), SV_PickClient_f(), SV_Player_g(), SV_RateInit(), SV_RateLimited(), sv_rcon_limit_changed(), SV_Savegame_f(), SV_SendAsyncPackets(), SV_SetMaster_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), sv_status_limit_changed(), SV_Stuff_f(), SV_StuffAll_f(), SV_StuffCvar_f(), SVC_Ack(), SVC_DirectConnect(), SVC_GetChallenge(), SVC_RemoteCommand(), SVC_Status(), and write_stream().
void SV_Shutdown(const char *finalmsg, error_type_t type)
cvar_t * Cvar_Set(const char *var_name, const char *value)
void CM_FreeMap(cm_t *cm)
static void set_frame_time(void)
void SV_BroadcastCommand(const char *fmt,...)
char * NET_AdrToString(const netadr_t *a)
qerror_t CM_LoadMap(cm_t *cm, const char *name)
entity_packed_t * entities
void SV_CheckForSavegame(mapcmd_t *cmd)
const char * Q_ErrorString(qerror_t error)
void SV_SendClientMessages(void)
static void override_entity_string(const char *server)
#define SV_InfoSet(var, val)
cvar_t * sv_airaccelerate
unsigned Sys_Milliseconds(void)
void CL_Disconnect(error_type_t type)
#define FOR_EACH_MASTER(m)
void SV_MvdMapChanged(void)
#define FOR_EACH_CLIENT(client)
cvar_t * sv_reserved_slots
static void resolve_masters(void)
void Com_Error(error_type_t type, const char *fmt,...)
#define HEARTBEAT_SECONDS
void SV_SendAsyncPackets(void)
void AC_Connect(unsigned mvd_spawn)
#define SV_LoadFile(path, buf)
char * va(const char *format,...)
int Cvar_VariableInteger(const char *var_name)
qboolean NET_StringToAdr(const char *s, netadr_t *a, int default_port)
void NET_Config(netflag_t flag)
size_t Q_strlcpy(char *dst, const char *src, size_t size)
void SV_InitGameProgs(void)
void Cvar_SetInteger(cvar_t *var, int value, from_t from)
cvar_t * Cvar_FullSet(const char *var_name, const char *value, int flags, from_t from)
cvar_t * Cvar_WeakGet(const char *var_name)
int Cvar_ClampInteger(cvar_t *var, int min, int max)
void Cvar_GetLatchedVars(void)
void SV_ShutdownGameProgs(void)
void SCR_BeginLoadingPlaque(void)
size_t Q_concat(char *dest, size_t size,...)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
cvar_t * map_override_path
char fs_gamedir[MAX_OSPATH]
void SV_ClientReset(client_t *client)