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> 39 typedef struct sv_edict_s {
47 typedef struct sv_model_s {
57 typedef struct worldSector_s {
60 struct worldSector_s* children[2];
66 typedef struct pending_event_s {
76 typedef struct serverInstanceStatic_s {
89 #ifndef HARD_LINKED_GAME 95 typedef enum server_state_e {
106 typedef struct serverInstanceGame_s {
137 #define PLAYER_NUM(n) ((player_t*)((byte*)svs.ge->players + svs.ge->player_size * (n))) 155 typedef struct client_s {
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);
void void void SV_BroadcastPrintf(int level, const char *fmt,...) __attribute__((format(__printf__
server_state_t SV_GetServerState(void)
char * SV_GetConfigString(int index)
static mesh models (none-animated) can have a server side flag set to be clipped for pathfinding ...
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.
QGL_EXTERN GLsizei const GLvoid * data
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.
void SV_SetClientState(client_t *client, client_state_t state)
Set the client state.
struct worldSector_s * worldSector
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)
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
#define SV_SetConfigString(index, value)
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.
void SV_MapcycleInit(void)
To avoid linearly searching through lists of entities during environment testing, the world is carved...
struct datagram_socket * netDatagramSocket
int SV_RunGameFrameThread(void *data)
Thread for the game frame function.
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.
pending_event_t pendingEvent
int SV_PointContents(const vec3_t p)
Returns the content flags for a given point.
struct net_stream * stream
functions exported by the game subsystem
static EventPriorityQueue eventQueue
unsigned int numWorldSectors
void SV_ClearWorld(void)
Clear physics interaction links.
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 that is only valid for one map. It's deleted on every map load.
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.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
struct sv_edict_s * nextEntityInWorldSector
struct client_s * clients
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__
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.
void SV_ReadPacket(struct net_stream *s)
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...
int SV_GetConfigStringLength(int index)
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
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)))