UFO: Alien Invasion
|
Main server include file. More...
#include "../common/common.h"
#include "../common/http.h"
#include "../shared/infostring.h"
#include "../game/game.h"
#include <SDL_thread.h>
Go to the source code of this file.
Data Structures | |
struct | sv_edict_s |
struct | sv_model_s |
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding More... | |
struct | worldSector_s |
To avoid linearly searching through lists of entities during environment testing, the world is carved up with an evenly spaced, axially aligned bsp tree. More... | |
struct | pending_event_s |
struct | serverInstanceStatic_s |
struct | serverInstanceGame_s |
Struct that is only valid for one map. It's deleted on every map load. More... | |
struct | client_s |
Macros | |
#define | AREA_NODES 32 |
#define | PLAYER_NUM(n) ((player_t*)((byte*)svs.ge->players + svs.ge->player_size * (n))) |
#define | SV_SetConfigString(index, value) SV_SetConfigString(index, value) |
Typedefs | |
typedef struct sv_edict_s | sv_edict_t |
typedef struct sv_model_s | sv_model_t |
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding More... | |
typedef struct worldSector_s | worldSector_t |
To avoid linearly searching through lists of entities during environment testing, the world is carved up with an evenly spaced, axially aligned bsp tree. More... | |
typedef struct pending_event_s | pending_event_t |
typedef struct serverInstanceStatic_s | serverInstanceStatic_t |
typedef enum server_state_e | server_state_t |
typedef struct serverInstanceGame_s | serverInstanceGame_t |
Struct that is only valid for one map. It's deleted on every map load. More... | |
typedef struct client_s | client_t |
Enumerations | |
enum | server_state_e { ss_dead, ss_restart, ss_loading, ss_game, ss_game_shutdown } |
enum | client_state_t { cs_free, cs_connected, cs_spawning, cs_began, cs_spawned } |
Functions | |
void | SV_DropClient (client_t *drop, const char *message) |
Called when the player is totally leaving the server, either willingly or unwillingly. This is NOT called if the entire server is quitting or crashing. More... | |
int | SV_CountPlayers (void) |
Returns the number of spawned players. More... | |
void | SV_InitOperatorCommands (void) |
void | SV_UserinfoChanged (client_t *cl) |
Pull specific info from a newly changed userinfo string into a more C friendly form. More... | |
void | SV_ReadPacket (struct net_stream *s) |
char * | SV_GetConfigString (int index) |
int | SV_GetConfigStringLength (int index) |
int | SV_GetConfigStringInteger (int index) |
char * | SV_SetConfigString (int index,...) |
client_t * | SV_GetNextClient (client_t *lastClient) |
Iterates through clients. More... | |
client_t * | SV_GetClient (int index) |
void | SV_MapcycleInit (void) |
void | SV_NextMapcycle (void) |
Start the next map in the cycle. More... | |
void | SV_MapcycleClear (void) |
Empty the mapcycle list. More... | |
void | SV_Map (bool day, const char *levelstring, const char *assembly, bool verbose=true) |
Change the server to a new map, taking all connected clients along with it. More... | |
void | SV_Multicast (int mask, const dbuffer &msg) |
Sends the contents of msg to a subset of the clients, then frees msg. More... | |
void | SV_ClientCommand (client_t *client, const char *fmt,...) __attribute__((format(__printf__ |
void void | SV_ClientPrintf (client_t *cl, int level, const char *fmt,...) __attribute__((format(__printf__ |
void void void | SV_BroadcastPrintf (int level, const char *fmt,...) __attribute__((format(__printf__ |
void void void void | SV_ExecuteClientMessage (client_t *cl, int cmd, dbuffer *msg) |
The current net_message is parsed for the given client. More... | |
void | SV_SetClientState (client_t *client, client_state_t state) |
Set the client state. More... | |
void | SV_SetMaster_f (void) |
Add the server to the master server list so that others can see the server in the server list. More... | |
void | SV_Heartbeat_f (void) |
bool | SV_CheckMap (const char *map, const char *assembly) |
Checks whether a map exists. More... | |
int | SV_RunGameFrameThread (void *data) |
Thread for the game frame function. More... | |
void | SV_RunGameFrame (void) |
Calls the G_RunFrame function from game api let everything in the world think and move. More... | |
void | SV_InitGameProgs (void) |
Init the game subsystem for a new map. More... | |
void | SV_ShutdownGameProgs (void) |
Called when either the entire server is being killed, or it is changing to a different game directory. More... | |
void | SV_ClearWorld (void) |
Clear physics interaction links. More... | |
void | SV_UnlinkEdict (edict_t *ent) |
call before removing an entity, and before trying to move one, so it doesn't clip against itself More... | |
void | SV_LinkEdict (edict_t *ent) |
Needs to be called any time an entity changes origin, mins, maxs, or solid. Automatically unlinks if needed. Sets ent->absmin and ent->absBox.maxs. More... | |
int | SV_PointContents (const vec3_t p) |
Returns the content flags for a given point. More... | |
const char * | SV_GetFootstepSound (const char *texture) |
Query the footstep sound for the given surface texture. More... | |
float | SV_GetBounceFraction (const char *texture) |
Different terrain types might have different bounce fraction. More... | |
bool | SV_LoadModelAABB (const char *model, int frame, AABB &aabb) |
Load the bounding box for the model on the serverside for pathfinding and clipping. More... | |
trace_t | SV_Trace (const Line &traceLine, const AABB &box, const edict_t *passedict, int contentmask) |
Moves the given mins/maxs volume through the world from start to end. More... | |
server_state_t | SV_GetServerState (void) |
void | SV_SetServerState (server_state_t) |
Variables | |
memPool_t * | sv_genericPool |
serverInstanceStatic_t | svs |
serverInstanceGame_t * | sv |
cvar_t * | sv_mapname |
cvar_t * | sv_rma |
cvar_t * | sv_rmadisplaythemap |
display a character graphic of the tiles placed when RMA2 reaches a dead end. More... | |
cvar_t * | sv_public |
cvar_t * | sv_dumpmapassembly |
cvar_t * | sv_threads |
Main server include file.
Definition in file server.h.
Definition at line 137 of file server.h.
Referenced by SVC_DirectConnect(), and TEST_F().
Definition at line 188 of file server.h.
Referenced by SV_Configstring(), SV_FindIndex(), and SV_Map().
a client can leave the server in one of four ways:
typedef struct pending_event_s pending_event_t |
typedef enum server_state_e server_state_t |
typedef struct serverInstanceGame_s serverInstanceGame_t |
Struct that is only valid for one map. It's deleted on every map load.
typedef struct serverInstanceStatic_s serverInstanceStatic_t |
typedef struct sv_edict_s sv_edict_t |
typedef struct sv_model_s sv_model_t |
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding
typedef struct worldSector_s worldSector_t |
To avoid linearly searching through lists of entities during environment testing, the world is carved up with an evenly spaced, axially aligned bsp tree.
enum client_state_t |
enum server_state_e |
Referenced by SV_DropClient(), SV_InitGameProgs(), and SV_Kick_f().
bool SV_CheckMap | ( | const char * | map, |
const char * | assembly | ||
) |
Checks whether a map exists.
Definition at line 101 of file sv_ccmds.cpp.
References Com_Printf(), Com_sprintf(), FS_CheckFile(), and MAX_QPATH.
Referenced by SV_Map_f(), and SV_MapcycleAdd_f().
Clear physics interaction links.
Definition at line 81 of file sv_world.cpp.
References mapData_s::mapBox, serverInstanceGame_s::mapData, sv, and SV_CreateWorldSector().
Referenced by SV_CheckSpawnSoldiers(), SV_CheckStartMatch(), and SV_New_f().
Referenced by SV_PlayerPrintf().
Returns the number of spawned players.
Definition at line 1096 of file sv_main.cpp.
References cl, count, cs_spawned, serverInstanceStatic_s::initialized, client_s::state, SV_GetNextClient(), and svs.
Called when the player is totally leaving the server, either willingly or unwillingly. This is NOT called if the entire server is quitting or crashing.
Definition at line 184 of file sv_main.cpp.
References serverInstanceStatic_s::abandon, cl, count, cs_connected, cs_free, cs_spawned, cs_spawning, serverInstanceStatic_s::ge, serverInstanceStatic_s::killserver, client_s::name, NET_StreamFinished(), NET_WriteByte(), NET_WriteMsg(), NET_WriteString(), client_s::player, PRINT_CHAT, serverInstanceStatic_s::serverMutex, SrvPlayer::setInUse(), client_s::state, client_s::stream, SV_BroadcastPrintf(), SV_GetNextClient(), SV_SetClientState(), svc_disconnect, and svs.
Referenced by SV_Begin_f(), SV_CheckTimeouts(), SV_Disconnect_f(), SV_ExecuteClientMessage(), SV_Kick_f(), SV_New_f(), and SV_StartMatch_f().
The current net_message is parsed for the given client.
Definition at line 235 of file sv_user.cpp.
References clc_ack, clc_action, clc_endround, clc_initactorstates, clc_nop, clc_stringcmd, clc_teaminfo, clc_userinfo, Com_DPrintf(), Com_Printf(), cs_free, cs_spawned, DEBUG_SERVER, serverInstanceStatic_s::ge, client_s::lastmessage, MAX_CLC_STRINGCMD, serverInstanceGame_s::messageBuffer, NET_ReadString(), client_s::player, serverInstanceStatic_s::realtime, serverInstanceStatic_s::serverMutex, client_s::state, sv, SV_DropClient(), SV_ExecuteUserCommand(), SV_SetClientState(), SV_UserinfoChanged(), svs, and client_s::userinfo.
Referenced by SV_ReadPacket().
float SV_GetBounceFraction | ( | const char * | texture | ) |
Different terrain types might have different bounce fraction.
Definition at line 462 of file sv_world.cpp.
References terrainType_s::bounceFraction, and Com_GetTerrainType().
Referenced by SV_InitGameProgs().
Definition at line 174 of file sv_main.cpp.
References serverInstanceStatic_s::clients, index, and svs.
Referenced by SV_CheckStartMatch(), SV_New_f(), SV_PlayerPrintf(), and SVC_DirectConnect().
char* SV_GetConfigString | ( | int | index | ) |
Definition at line 77 of file sv_main.cpp.
References Com_CheckConfigStringIndex(), Com_Error(), serverInstanceGame_s::configstrings, ERR_FATAL, index, and sv.
Referenced by SV_FindIndex(), SV_GetConfigStringInteger(), SV_Map(), SV_New_f(), SV_PrintConfigStrings_f(), and TEST_F().
Definition at line 108 of file sv_main.cpp.
References SV_GetConfigString().
Referenced by SV_Map(), and SV_Status_f().
Definition at line 85 of file sv_main.cpp.
References Com_CheckConfigStringIndex(), Com_Error(), CS_ENTITYSTRING, CS_GENERAL, CS_MODELS, CS_PLAYERNAMES, CS_POSITIONS, CS_TILES, ERR_FATAL, MAX_CLIENTS, MAX_ENTITYSTRINGS, MAX_GENERAL, MAX_MODELS, MAX_TILESTRINGS, and MAX_TOKEN_CHARS.
Referenced by SV_ParseUMP().
const char* SV_GetFootstepSound | ( | const char * | texture | ) |
Query the footstep sound for the given surface texture.
nullptr
or the footstep sound filename if there is one assigned in the scripts Definition at line 451 of file sv_world.cpp.
References Com_GetTerrainType(), and terrainType_s::footstepSound.
Referenced by SV_InitGameProgs(), and TEST_F().
Iterates through clients.
[in] | lastClient | Pointer of the client to iterate from. call with nullptr to get the first one. |
Definition at line 152 of file sv_main.cpp.
References serverInstanceStatic_s::clients, cvar_s::integer, and svs.
Referenced by SV_BroadcastPrintf(), SV_CheckSpawnSoldiers(), SV_CheckStartMatch(), SV_CheckTimeouts(), SV_CountPlayers(), SV_DropClient(), SV_FinalMessage(), SV_GetPlayerClientStructure(), SV_Map(), SV_Multicast(), SV_PingPlayers(), SV_StartGame_f(), SV_Status_f(), SVC_DirectConnect(), SVC_Info(), SVC_Status(), and SVC_TeamInfo().
server_state_t SV_GetServerState | ( | void | ) |
Definition at line 312 of file sv_user.cpp.
References serverInstanceGame_s::state, and sv.
Referenced by Com_ServerState().
Definition at line 35 of file sv_ccmds.cpp.
References serverInstanceStatic_s::lastHeartbeat, and svs.
Referenced by SV_InitGame(), SV_InitOperatorCommands(), and SV_SetMaster_f().
Init the game subsystem for a new map.
Definition at line 769 of file sv_game.cpp.
References game_export_s::apiversion, Cbuf_AddText(), Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Com_CreateThread(), Com_Error(), Com_GetCharacterValues(), Com_GetConstInt(), Com_GetConstIntFromNamespace(), Com_GetConstVariable(), Com_GrenadeTarget(), Com_Printf(), Com_RegisterConstInt(), Com_UnregisterConstVariable(), csi, Cvar_Get(), Cvar_GetString(), Cvar_Set(), ERR_DROP, FS_FreeFile(), FS_Gamedir(), FS_LoadFile(), GAME_API_VERSION, serverInstanceStatic_s::gameFrameCond, serverInstanceGame_s::gameSysPool, serverInstanceStatic_s::gameThread, serverInstanceStatic_s::ge, Grid_GetTUsForDirection(), Grid_MoveLength(), Grid_MoveNext(), Grid_MoveStore(), Grid_ShouldUseAutostand(), cvar_s::integer, Mem_CreatePool, sv, SV_AbortEvents(), SV_AddEvent(), SV_BroadcastPrintf(), SV_CanActorStandHere(), SV_Configstring(), SV_dprintf(), SV_EndEvents(), SV_error(), SV_FreeTags(), SV_GetBounceFraction(), SV_GetEvent(), SV_GetEventEdict(), SV_GetFootstepSound(), SV_GetGameAPI(), SV_GetInlineModelAABB(), SV_GetVisibility(), SV_GridCalcPathing(), SV_GridFall(), SV_GridFindPath(), SV_GridIsOnMap(), SV_GridPosToVec(), SV_LinkEdict(), SV_LoadModelAABB(), SV_MemFree(), SV_ModelIndex(), SV_PlayerPrintf(), 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_RunGameFrameThread(), SV_SetInlineModelOrientation(), SV_SetModel(), SV_TagAlloc(), SV_TestLine(), SV_TestLineWithEnt(), sv_threads, SV_Trace(), SV_UnlinkEdict(), SV_WriteAngle(), SV_WriteByte(), SV_WriteChar(), SV_WriteDir(), SV_WriteFormat(), SV_WriteGPos(), SV_WriteLong(), SV_WritePos(), SV_WriteShort(), SV_WriteString(), svs, Sys_Fopen(), and Sys_Milliseconds().
Referenced by SV_InitGame(), and TEST_F().
Definition at line 542 of file sv_ccmds.cpp.
References Cmd_AddCommand(), Cmd_AddParamCompleteFunction(), SV_CompleteMapCommand(), SV_CompleteServerCommand(), SV_Heartbeat_f(), SV_Kick_f(), SV_KillServer_f(), SV_ListMaps_f(), SV_Map_f(), SV_PrintConfigStrings_f(), SV_ServerCommand_f(), SV_Serverinfo_f(), SV_SetMaster_f(), SV_StartGame_f(), SV_Status_f(), and SV_UserInfo_f().
Referenced by SV_Init().
Needs to be called any time an entity changes origin, mins, maxs, or solid. Automatically unlinks if needed. Sets ent->absmin and ent->absBox.maxs.
Definition at line 131 of file sv_world.cpp.
References SrvEdict::absBox, SrvEdict::angles, worldSector_s::axis, CalculateMinsMaxs(), SrvEdict::child(), worldSector_s::children, worldSector_s::dist, game_export_s::edicts, sv_edict_s::ent, SrvEdict::entBox, worldSector_s::entities, AABB::expandXY(), serverInstanceStatic_s::ge, AABB::getDiagonal(), SrvEdict::inuse, LEAFNODE, SrvEdict::linkcount, sv_edict_s::linked, AABB::maxs, AABB::mins, sv_edict_s::nextEntityInWorldSector, SrvEdict::origin, AABB::set(), SrvEdict::size, SrvEdict::solid, SOLID_BSP, SOLID_NOT, sv, SV_GetServerDataForEdict(), SV_UnlinkEdict(), svs, UNIT_SIZE, vec3_origin, sv_edict_s::worldSector, and serverInstanceGame_s::worldSectors.
Referenced by SV_InitGameProgs().
Load the bounding box for the model on the serverside for pathfinding and clipping.
[in] | model | The relative model path to load the bounding box for |
[in] | frame | The frame to load the bounding box for |
[out] | aabb | The bounding box of the model - this is absolute to the worldorigin (0,0,0) |
Definition at line 543 of file sv_world.cpp.
References sv_model_s::aabb, Com_Error(), com_genericPool, Com_GetExtension(), Com_sprintf(), ERR_DROP, sv_model_s::frame, FS_FreeFile(), FS_LoadFile(), i, IDALIASHEADER, IDMD3HEADER, LittleLong, MAX_MOD_KNOWN, MAX_QPATH, Mem_PoolStrDup, mod_extensions, sv_model_s::name, serverInstanceGame_s::numSVModels, OBJZERO, Q_strcasecmp, Q_streq, AABB::reset(), AABB::set(), AABB::setNegativeVolume(), sv, SV_ModLoadAliasMD2Model(), SV_ModLoadAliasMD3Model(), SV_ModLoadObjModel(), and serverInstanceGame_s::svModels.
Referenced by SV_InitGameProgs().
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.
Definition at line 113 of file sv_init.cpp.
References serverInstanceGame_s::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_s::ge, i, serverInstanceStatic_s::initialized, mapData_s::mapChecksum, serverInstanceGame_s::mapData, mapData_s::mapEntityString, serverInstanceGame_s::mapTiles, MAX_VAR, serverInstanceGame_s::models, serverInstanceGame_s::name, mapData_s::numInline, csi_s::numODs, Q_strncpyz(), Q_strstart(), Q_strvalid, SCR_BeginLoadingPlaque(), serverInstanceStatic_s::serverMutex, ss_game, ss_loading, ss_restart, client_s::state, SV_AssembleMapAndTitle(), SV_ClearWorld(), SV_GetConfigString(), SV_GetConfigStringInteger(), SV_GetMapTitle(), SV_GetNextClient(), SV_InitGame(), sv_mapname, SV_SetClientState(), SV_SetConfigString, UFO_VERSION, and va().
Referenced by SV_Frame(), SV_Map_f(), TEST_F(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().
Empty the mapcycle list.
Definition at line 137 of file sv_mapcycle.cpp.
References i, mapcycle_s::map, mapcycleCount, mapcycleList, Mem_Free, mapcycle_s::next, and mapcycle_s::type.
Referenced by SV_Clear(), and SV_MapcycleInit().
Definition at line 269 of file sv_mapcycle.cpp.
References Cmd_AddCommand(), SV_MapcycleAdd_f(), SV_MapcycleClear(), SV_MapcycleList_f(), SV_MapcycleNext_f(), and SV_ParseMapcycle().
Referenced by SV_Init().
Sends the contents of msg to a subset of the clients, then frees msg.
[in] | mask | Bitmask of the players to send the multicast to |
[in,out] | msg | The message to send to the clients |
Definition at line 126 of file sv_send.cpp.
References cl, cs_connected, NET_WriteConstMsg(), client_s::state, client_s::stream, and SV_GetNextClient().
Referenced by SV_Configstring(), SV_EndEvents(), SV_FindIndex(), and SV_SendQueuedEvents().
Start the next map in the cycle.
Definition at line 20 of file sv_mapcycle.cpp.
References serverInstanceGame_s::assembly, Cbuf_AddText(), Com_DPrintf(), Com_Printf(), Com_SetGameType(), Com_sprintf(), Cvar_Set(), mapcycle_s::day, DEBUG_SERVER, FS_CheckFile(), i, mapcycle_s::map, mapcycleCount, mapcycleList, MAX_QPATH, cvar_s::modified, serverInstanceGame_s::name, mapcycle_s::next, Q_streq, Q_strncpyz(), sv, sv_gametype, and mapcycle_s::type.
Referenced by SV_Frame(), and SV_MapcycleNext_f().
Returns the content flags for a given point.
Definition at line 395 of file sv_world.cpp.
References CM_CompleteBoxTrace(), trace_s::contentFlags, AABB::EMPTY, trace_s::fraction, serverInstanceGame_s::mapTiles, MASK_ALL, sv, and TRACE_ALL_LEVELS.
Referenced by SV_InitGameProgs().
void SV_ReadPacket | ( | struct net_stream * | s | ) |
Definition at line 669 of file sv_main.cpp.
References cl, clc_oob, NET_ReadByte(), NET_ReadMsg(), NET_StreamFree(), NET_StreamGetData(), SV_ConnectionlessPacket(), and SV_ExecuteClientMessage().
Referenced by SV_InitGame().
Calls the G_RunFrame function from game api let everything in the world think and move.
Definition at line 758 of file sv_game.cpp.
References serverInstanceGame_s::endgame, serverInstanceStatic_s::ge, ss_game_shutdown, serverInstanceGame_s::state, sv, and svs.
Referenced by SV_Frame(), and SV_RunGameFrameThread().
Thread for the game frame function.
Definition at line 741 of file sv_game.cpp.
References serverInstanceGame_s::endgame, serverInstanceStatic_s::gameFrameCond, serverInstanceStatic_s::serverMutex, sv, SV_RunGameFrame(), and svs.
Referenced by SV_InitGameProgs().
void SV_SetClientState | ( | client_t * | client, |
client_state_t | state | ||
) |
Set the client state.
Definition at line 36 of file sv_user.cpp.
References Com_DPrintf(), DEBUG_SERVER, client_s::name, and client_s::state.
Referenced by SV_Begin_f(), SV_DropClient(), SV_ExecuteClientMessage(), SV_Map(), SV_New_f(), and SVC_DirectConnect().
char* SV_SetConfigString | ( | int | index, |
... | |||
) |
Definition at line 113 of file sv_main.cpp.
References Com_CheckConfigStringIndex(), Com_Error(), serverInstanceGame_s::configstrings, CS_LIGHTMAP, CS_MAPCHECKSUM, CS_OBJECTAMOUNT, CS_POSITIONS, CS_TILES, CS_UFOCHECKSUM, ERR_FATAL, index, MAX_TILESTRINGS, MAX_TOKEN_CHARS, Q_strncpyz(), sv, and va().
Add the server to the master server list so that others can see the server in the server list.
Definition at line 45 of file sv_ccmds.cpp.
References Com_Printf(), Cvar_Set(), HTTP_GetURL(), cvar_s::integer, masterserver_url, port, cvar_s::string, sv_dedicated, SV_Heartbeat_f(), sv_maxclients, and va().
Referenced by SV_InitGame(), and SV_InitOperatorCommands().
void SV_SetServerState | ( | server_state_t | ) |
Definition at line 317 of file sv_user.cpp.
References serverInstanceGame_s::state, and sv.
Called when either the entire server is being killed, or it is changing to a different game directory.
Definition at line 703 of file sv_game.cpp.
References Cmd_ExecuteString(), Com_Printf(), Com_SetServerState(), serverInstanceStatic_s::gameFrameCond, serverInstanceGame_s::gameSysPool, serverInstanceStatic_s::gameThread, serverInstanceStatic_s::ge, Mem_DeletePool, Mem_PoolSize, ss_game_shutdown, sv, SV_UnloadGame(), and svs.
Referenced by SV_Shutdown(), GameTest::TearDown(), TEST_F(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), and GameTest::testCountSpawnpointsForMapInSingleplayerMode().
trace_t SV_Trace | ( | const Line & | traceLine, |
const AABB & | box, | ||
const edict_t * | passedict, | ||
int | contentmask | ||
) |
Moves the given mins/maxs volume through the world from start to end.
[in] | traceLine | The from/to position in the world for this trace |
[in] | box | The bounding box that is moved through the world |
[in] | passedict | is explicitly excluded from clipping checks (normally nullptr) if the entire move stays in a solid volume, trace.allsolid will be set, trace.startsolid will be set, and trace.fraction will be 0 if the starting point is in a solid, it will be allowed to move out to an open area |
[in] | contentmask | brushes the trace should stop at (see MASK_*) |
clip.trace.mapTile
to get the correct one Definition at line 417 of file sv_world.cpp.
References MoveClip::calcBounds(), CM_CompleteBoxTrace(), MoveClip::contentmask, trace_s::entNum, trace_s::fraction, serverInstanceGame_s::mapTiles, MoveClip::moveLine, MoveClip::objBox, OBJZERO, MoveClipSV::passedict, Line::set(), AABB::set(), sv, SV_ClipMoveToEntities(), MoveClipSV::trace, and TRACE_ALL_LEVELS.
Referenced by SV_InitGameProgs(), and TEST_F().
call before removing an entity, and before trying to move one, so it doesn't clip against itself
Definition at line 97 of file sv_world.cpp.
References Com_Printf(), worldSector_s::entities, sv_edict_s::linked, sv_edict_s::nextEntityInWorldSector, SV_GetServerDataForEdict(), and sv_edict_s::worldSector.
Referenced by SV_InitGameProgs(), and SV_LinkEdict().
Pull specific info from a newly changed userinfo string into a more C friendly form.
Definition at line 921 of file sv_main.cpp.
References Com_DPrintf(), DEBUG_SERVER, serverInstanceStatic_s::ge, i, Info_IntegerForKey(), Info_ValueForKey(), client_s::messagelevel, client_s::name, client_s::player, Q_strncpyz(), serverInstanceStatic_s::serverMutex, svs, and client_s::userinfo.
Referenced by SV_ExecuteClientMessage(), and SVC_DirectConnect().
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_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(), and TexinfoForBrushTexture().
cvar_t* sv_dumpmapassembly |
Definition at line 47 of file sv_main.cpp.
Referenced by FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefTest::SetUpTestCase(), RandomMapAssemblyTest::SetUpTestCase(), and SV_BuildMapStrings().
memPool_t* sv_genericPool |
Definition at line 55 of file sv_main.cpp.
Referenced by FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), GameTest::SetUpTestCase(), SV_InitGame(), and SV_MapcycleAdd().
cvar_t* sv_mapname |
Definition at line 53 of file sv_main.cpp.
Referenced by SV_Map().
cvar_t* sv_public |
should heartbeats be sent? (only for public servers)
should heartbeats be sent
Definition at line 52 of file sv_main.cpp.
Referenced by FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefTest::SetUpTestCase(), and SV_InitGame().
cvar_t* sv_rma |
Definition at line 49 of file sv_main.cpp.
Referenced by RandomMapAssemblyTest::SetUpTestCase(), SV_AddMapTiles(), and SV_DoMapAssemble().
cvar_t* sv_rmadisplaythemap |
display a character graphic of the tiles placed when RMA2 reaches a dead end.
Definition at line 50 of file sv_main.cpp.
Referenced by RandomMapAssemblyTest::SetUpTestCase(), SV_AddMapTiles(), and SV_AddMissingTiles_r().
cvar_t* sv_threads |
run the game lib threaded
Definition at line 48 of file sv_main.cpp.
Referenced by RandomMapAssemblyTest::SetUpTestCase(), SV_AddMapTiles(), SV_DoMapAssemble(), SV_InitGameProgs(), SV_ParallelSearch(), and TEST_F().
persistant server instance info
Definition at line 35 of file sv_init.cpp.
Referenced by Master_Heartbeat(), SV_Begin_f(), SV_CheckTimeouts(), SV_CountPlayers(), SV_DropClient(), SV_ExecuteClientMessage(), SV_ExecuteUserCommand(), SV_Frame(), SV_GetClient(), SV_GetGameAPI(), SV_GetNextClient(), SV_Heartbeat_f(), SV_Init(), SV_InitGameProgs(), SV_Kick_f(), SV_KillServer_f(), SV_LinkEdict(), SV_LoadGame(), SV_PingPlayers(), SV_RunGameFrame(), SV_RunGameFrameThread(), SV_ServerCommand_f(), SV_Shutdown(), SV_ShutdownGameProgs(), SV_ShutdownWhenEmpty(), SV_StartMatch_f(), SV_Status_f(), SV_UnloadGame(), SV_UserInfo_f(), SV_UserinfoChanged(), SVC_DirectConnect(), SVC_Status(), SVC_TeamInfo(), and TEST_F().