31 #include "../common/common.h"
32 #include "../common/http.h"
33 #include "../shared/infostring.h"
34 #include "../game/game.h"
35 #include <SDL_thread.h>
89 #ifndef HARD_LINKED_GAME
137 #define PLAYER_NUM(n) ((player_t*)((byte*)svs.ge->players + svs.ge->player_size * (n)))
188 #define SV_SetConfigString(index, value) SV_SetConfigString(index, value)
198 void SV_Map(
bool day,
const char* levelstring,
const char* assembly,
bool verbose =
true);
212 bool SV_CheckMap(const
char* map, const
char* assembly);
sv_model_t svModels[MAX_MOD_KNOWN]
pending_event_t eventQueue[64]
void void void SV_BroadcastPrintf(int level, const char *fmt,...) __attribute__((format(__printf__
server_state_t SV_GetServerState(void)
char * SV_GetConfigString(int index)
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
struct worldSector_s * worldSector
char userinfo[MAX_INFO_STRING]
enum server_state_e server_state_t
memPool_t * sv_genericPool
void SV_SetMaster_f(void)
Add the server to the master server list so that others can see the server in the server list...
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.
int SV_CountPlayers(void)
Returns the number of spawned players.
void SV_UnlinkEdict(edict_t *ent)
call before removing an entity, and before trying to move one, so it doesn't clip against itself ...
client_t * SV_GetNextClient(client_t *lastClient)
Iterates through clients.
struct cBspModel_s * models[MAX_MODELS]
void SV_SetClientState(client_t *client, client_state_t state)
Set the client state.
void SV_MapcycleClear(void)
Empty the mapcycle list.
bool SV_LoadModelAABB(const char *model, int frame, AABB &aabb)
Load the bounding box for the model on the serverside for pathfinding and clipping.
void SV_LinkEdict(edict_t *ent)
Needs to be called any time an entity changes origin, mins, maxs, or solid. Automatically unlinks if ...
void SV_InitOperatorCommands(void)
client_t * SV_GetClient(int index)
Struct that is only valid for one map. It's deleted on every map load.
void SV_Multicast(int mask, const dbuffer &msg)
Sends the contents of msg to a subset of the clients, then frees msg.
serverInstanceGame_t * sv
pending_event_t pendingEvent
#define SV_SetConfigString(index, value)
functions exported by the game subsystem
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.
struct pending_event_s pending_event_t
struct worldSector_s * children[2]
void SV_MapcycleInit(void)
int SV_RunGameFrameThread(void *data)
Thread for the game frame function.
struct worldSector_s worldSector_t
To avoid linearly searching through lists of entities during environment testing, the world is carved...
void SV_RunGameFrame(void)
Calls the G_RunFrame function from game api let everything in the world think and move...
#define MAX_CONFIGSTRINGS
bool SV_CheckMap(const char *map, const char *assembly)
Checks whether a map exists.
struct sv_edict_s * nextEntityInWorldSector
int SV_PointContents(const vec3_t p)
Returns the content flags for a given point.
void SV_ClearWorld(void)
Clear physics interaction links.
struct sv_model_s sv_model_t
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding ...
void SV_Heartbeat_f(void)
void SV_SetServerState(server_state_t)
void SV_ClientCommand(client_t *client, const char *fmt,...) __attribute__((format(__printf__
float SV_GetBounceFraction(const char *texture)
Different terrain types might have different bounce fraction.
struct net_stream * stream
struct client_s * clients
struct sv_edict_s sv_edict_t
cvar_t * sv_rmadisplaythemap
display a character graphic of the tiles placed when RMA2 reaches a dead end.
void SV_InitGameProgs(void)
Init the game subsystem for a new map.
sv_edict_t edicts[MAX_EDICTS]
unsigned int numWorldSectors
To avoid linearly searching through lists of entities during environment testing, the world is carved...
struct serverInstanceGame_s serverInstanceGame_t
Struct that is only valid for one map. It's deleted on every map load.
const char * SV_GetFootstepSound(const char *texture)
Query the footstep sound for the given surface texture.
void void SV_ClientPrintf(client_t *cl, int level, const char *fmt,...) __attribute__((format(__printf__
worldSector_t worldSectors[AREA_NODES]
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.
void void void void SV_ExecuteClientMessage(client_t *cl, int cmd, dbuffer *msg)
The current net_message is parsed for the given client.
GLsizei const GLvoid * data
struct serverInstanceStatic_s serverInstanceStatic_t
void SV_ReadPacket(struct net_stream *s)
char configstrings[MAX_CONFIGSTRINGS][MAX_TOKEN_CHARS]
void SV_NextMapcycle(void)
Start the next map in the cycle.
void SV_ShutdownGameProgs(void)
Called when either the entire server is being killed, or it is changing to a different game directory...
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding ...
int SV_GetConfigStringLength(int index)
cvar_t * sv_dumpmapassembly
serverInstanceStatic_t svs
void SV_UserinfoChanged(client_t *cl)
Pull specific info from a newly changed userinfo string into a more C friendly form.
int SV_GetConfigStringInteger(int index)
void format(__printf__, 1, 2)))
struct datagram_socket * netDatagramSocket