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

Server initialisation stuff. More...

#include "server.h"
#include "sv_rma.h"
#include "../shared/parse.h"
#include "../shared/scopedmutex.h"
Include dependency graph for sv_init.cpp:

Go to the source code of this file.

Functions

static const char * SV_GetMapTitle (const char *asmTitle, const char *const mapname)
 Get the map title for a given map.
static void SV_DiscoveryCallback (struct datagram_socket *s, const char *bufbuf, int len, struct sockaddr *from)
static void SV_InitGame (void)
 A brand new game has been started.
void SV_Map (bool day, const char *levelstring, const char *assembly, bool verbose)
 Change the server to a new map, taking all connected clients along with it.

Variables

serverInstanceStatic_t svs
serverInstanceGame_t * sv

Detailed Description

Server initialisation stuff.

Definition in file sv_init.cpp.

Function Documentation

◆ SV_DiscoveryCallback()

void SV_DiscoveryCallback ( struct datagram_socket * s,
const char * buf,
int len,
struct sockaddr * from )
static
See also
CL_ServerListDiscoveryCallback

Definition at line 64 of file sv_init.cpp.

References len, NET_DatagramSend(), and SV_DiscoveryCallback().

Referenced by SV_DiscoveryCallback(), and SV_InitGame().

◆ SV_GetMapTitle()

const char * SV_GetMapTitle ( const char * asmTitle,
const char *const mapname )
static

Get the map title for a given map.

Note
the title string must be translated client side
Returns
Never nullptr - mapname or maptitle (if defined in assembly)

Definition at line 43 of file sv_init.cpp.

References Com_Printf(), and SV_GetMapTitle().

Referenced by SV_GetMapTitle(), and SV_Map().

◆ SV_InitGame()

◆ SV_Map()

void SV_Map ( bool day,
const char * levelstring,
const char * assembly,
bool verbose )

Change the server to a new map, taking all connected clients along with it.

Note
the full syntax is:
map [day|night] [+]<map> [<assembly>]
See also
CM_LoadMap
Com_SetServerState

Definition at line 113 of file sv_init.cpp.

References serverInstanceGame_t::assembly, Cbuf_CopyToDefer(), cl, CM_InlineModel(), CM_LoadMap(), Com_DPrintf(), Com_GetScriptChecksum(), Com_Printf(), Com_SetServerState(), cs_connected, CS_ENTITYSTRING, CS_LIGHTMAP, CS_MAPCHECKSUM, CS_MAPTITLE, CS_MAPZONE, CS_NAME, CS_OBJECTAMOUNT, CS_POSITIONS, cs_spawning, CS_TILES, CS_UFOCHECKSUM, CS_VERSION, csi, Cvar_FullSet(), Cvar_GetString(), CVAR_NOSET, CVAR_SERVERINFO, DEBUG_SERVER, serverInstanceStatic_t::ge, i, serverInstanceStatic_t::initialized, mapData_t::mapChecksum, serverInstanceGame_t::mapData, mapData_t::mapEntityString, serverInstanceGame_t::mapTiles, MAX_VAR, serverInstanceGame_t::models, serverInstanceGame_t::name, mapData_t::numInline, csi_t::numODs, Q_strncpyz(), Q_strstart(), Q_strvalid, SCR_BeginLoadingPlaque(), serverInstanceStatic_t::serverMutex, ss_game, ss_loading, ss_restart, sv, SV_AssembleMapAndTitle(), SV_ClearWorld(), SV_GetConfigString(), SV_GetConfigStringInteger(), SV_GetMapTitle(), SV_GetNextClient(), SV_InitGame(), SV_Map(), sv_mapname, SV_SetClientState(), SV_SetConfigString, svs, UFO_VERSION, and va().

Referenced by SV_Frame(), SV_Map(), SV_Map_f(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().

Variable Documentation

◆ sv

server data per game/map

Definition at line 36 of file sv_init.cpp.

Referenced by Com_SetServerState(), GameTest::SetUp(), SV_AbortEvents(), SV_AddEvent(), SV_AreaEdicts(), SV_CanActorStandHere(), SV_CheckSpawnSoldiers(), SV_CheckStartMatch(), SV_ClearWorld(), SV_ClipMoveToEntities(), SV_CreateWorldSector(), SV_EndEvents(), SV_ExecuteClientMessage(), SV_Frame(), SV_FreeTags(), SV_GetConfigString(), SV_GetEvent(), SV_GetEventEdict(), SV_GetInlineModelAABB(), SV_GetMapData(), SV_GetMapTiles(), SV_GetServerDataForEdict(), SV_GetServerState(), SV_GetVisibility(), SV_GridCalcPathing(), SV_GridFall(), SV_GridFindPath(), SV_GridIsOnMap(), SV_GridPosToVec(), SV_HullForEntity(), SV_Init(), SV_InitGameProgs(), SV_LinkEdict(), SV_LoadModelAABB(), SV_Map(), SV_NextMapcycle(), SV_PointContents(), SV_QueueEvent(), SV_QueueWriteByte(), SV_QueueWritePos(), SV_QueueWriteShort(), SV_QueueWriteString(), SV_ReadAngle(), SV_ReadByte(), SV_ReadChar(), SV_ReadData(), SV_ReadDir(), SV_ReadFormat(), SV_ReadGPos(), SV_ReadLong(), SV_ReadPos(), SV_ReadShort(), SV_ReadString(), SV_RecalcRouting(), SV_RunGameFrame(), SV_RunGameFrameThread(), SV_SendQueuedEvents(), SV_SetConfigString(), SV_SetInlineModelOrientation(), SV_SetModel(), SV_SetServerState(), SV_Shutdown(), SV_ShutdownGameProgs(), SV_Status_f(), SV_TagAlloc(), SV_TestLine(), SV_TestLineWithEnt(), SV_Trace(), SV_WriteAngle(), SV_WriteByte(), SV_WriteChar(), SV_WriteDir(), SV_WriteFormat(), SV_WriteGPos(), SV_WriteLong(), SV_WritePos(), SV_WriteShort(), SV_WriteString(), SVC_DirectConnect(), SVC_Info(), TEST_F(), TEST_F(), and TexinfoForBrushTexture().

◆ svs