UFO: Alien Invasion
Loading...
Searching...
No Matches
sv_user.cpp File Reference

Server code for moving users. More...

#include "server.h"
#include "../shared/scopedmutex.h"
Include dependency graph for sv_user.cpp:

Go to the source code of this file.

Data Structures

struct  ucmd_t

Functions

void SV_SetClientState (client_t *client, client_state_t state)
 Set the client state.
static void SV_New_f (client_t *cl)
 Sends the first message from the server to a connected client. This will be sent on the initial connection and upon each server load. Client reads via CL_ParseServerData in cl_parse.c.
static void SV_Begin_f (client_t *cl)
static void SV_StartMatch_f (client_t *cl)
static void SV_Disconnect_f (client_t *cl)
 The client is going to disconnect, so remove the connection immediately.
static void SV_ShowServerinfo_f (client_t *cl)
 Dumps the serverinfo info string.
static void SV_ExecuteUserCommand (client_t *cl, const char *s)
void SV_ExecuteClientMessage (client_t *cl, int cmd, dbuffer *msg)
 The current net_message is parsed for the given client.
server_state_t SV_GetServerState (void)
void SV_SetServerState (server_state_t state)

Variables

static const ucmd_t ucmds []

Detailed Description

Server code for moving users.

Definition in file sv_user.cpp.

Function Documentation

◆ SV_Begin_f()

void SV_Begin_f ( client_t * cl)
static

◆ SV_Disconnect_f()

void SV_Disconnect_f ( client_t * cl)
static

The client is going to disconnect, so remove the connection immediately.

Definition at line 176 of file sv_user.cpp.

References cl, and SV_DropClient().

◆ SV_ExecuteClientMessage()

◆ SV_ExecuteUserCommand()

void SV_ExecuteUserCommand ( client_t * cl,
const char * s )
static

◆ SV_GetServerState()

server_state_t SV_GetServerState ( void )

Definition at line 312 of file sv_user.cpp.

References sv.

Referenced by Com_ServerState(), and SV_BroadcastPrintf().

◆ SV_New_f()

void SV_New_f ( client_t * cl)
static

Sends the first message from the server to a connected client. This will be sent on the initial connection and upon each server load. Client reads via CL_ParseServerData in cl_parse.c.

See also
CL_Reconnect_f
CL_ConnectionlessPacket

Definition at line 56 of file sv_user.cpp.

References cl, CL_PRECACHE, Com_DPrintf(), Com_Printf(), Com_ServerState(), cs_connected, CS_MODELS, CS_NAME, CS_POSITIONS, cs_spawning, CS_TILES, DEBUG_SERVER, i, MAX_CONFIGSTRINGS, NET_WriteByte(), NET_WriteLong(), NET_WriteMsg(), NET_WriteShort(), NET_WriteString(), PROTOCOL_VERSION, Q_strvalid, ss_game, SV_ClientCommand(), SV_DropClient(), SV_GetClient(), SV_GetConfigString(), SV_SetClientState(), svc_configstring, and svc_serverdata.

◆ SV_SetClientState()

void SV_SetClientState ( client_t * client,
client_state_t state )

◆ SV_SetServerState()

void SV_SetServerState ( server_state_t state)

Definition at line 317 of file sv_user.cpp.

References sv.

Referenced by SV_BroadcastPrintf().

◆ SV_ShowServerinfo_f()

void SV_ShowServerinfo_f ( client_t * cl)
static

Dumps the serverinfo info string.

Definition at line 185 of file sv_user.cpp.

References cl, Cvar_Serverinfo(), Info_Print(), and MAX_INFO_STRING.

◆ SV_StartMatch_f()

void SV_StartMatch_f ( client_t * cl)
static
See also
SV_Begin_f

Definition at line 154 of file sv_user.cpp.

References Cbuf_InsertFromDefer(), cl, Com_DPrintf(), cs_spawned, DEBUG_SERVER, SV_DropClient(), and svs.

Variable Documentation

◆ ucmds

const ucmd_t ucmds[]
static
Initial value:
= {
{nullptr, nullptr}
}
#define NET_STATE_INFO
Definition q_shared.h:612
#define NET_STATE_BEGIN
Definition q_shared.h:609
#define NET_STATE_DISCONNECT
Definition q_shared.h:611
#define NET_STATE_NEW
Definition q_shared.h:608
#define NET_STATE_STARTMATCH
Definition q_shared.h:610
static void SV_Disconnect_f(client_t *cl)
The client is going to disconnect, so remove the connection immediately.
Definition sv_user.cpp:176
static void SV_Begin_f(client_t *cl)
Definition sv_user.cpp:123
static void SV_ShowServerinfo_f(client_t *cl)
Dumps the serverinfo info string.
Definition sv_user.cpp:185
static void SV_StartMatch_f(client_t *cl)
Definition sv_user.cpp:154
static void SV_New_f(client_t *cl)
Sends the first message from the server to a connected client. This will be sent on the initial conne...
Definition sv_user.cpp:56

Definition at line 197 of file sv_user.cpp.

Referenced by SV_ExecuteUserCommand().