Quake II RTX doxygen
1.0 dev
|
|
#include "shared/shared.h"
#include "shared/list.h"
#include "shared/game.h"
#include "common/bsp.h"
#include "common/cmd.h"
#include "common/cmodel.h"
#include "common/common.h"
#include "common/cvar.h"
#include "common/error.h"
#include "common/files.h"
#include "common/msg.h"
#include "common/net/net.h"
#include "common/net/chan.h"
#include "common/pmove.h"
#include "common/prompt.h"
#include "common/protocol.h"
#include "common/x86/fpu.h"
#include "common/zone.h"
#include "client/client.h"
#include "server/server.h"
#include "system/system.h"
Go to the source code of this file.
|
#define | SV_Malloc(size) Z_TagMalloc(size, TAG_SERVER) |
|
#define | SV_Mallocz(size) Z_TagMallocz(size, TAG_SERVER) |
|
#define | SV_CopyString(s) Z_TagCopyString(s, TAG_SERVER) |
|
#define | SV_LoadFile(path, buf) FS_LoadFileEx(path, buf, 0, TAG_SERVER) |
|
#define | SV_FreeFile(buf) Z_Free(buf) |
|
#define | SV_DPrintf(...) |
|
#define | SV_BASELINES_SHIFT 6 |
|
#define | SV_BASELINES_PER_CHUNK (1 << SV_BASELINES_SHIFT) |
|
#define | SV_BASELINES_MASK (SV_BASELINES_PER_CHUNK - 1) |
|
#define | SV_BASELINES_CHUNKS (MAX_EDICTS >> SV_BASELINES_SHIFT) |
|
#define | SV_InfoSet(var, val) Cvar_FullSet(var, val, CVAR_SERVERINFO|CVAR_ROM, FROM_CODE) |
|
#define | SV_PAUSED 0 |
|
#define | SV_GMF_VARIABLE_FPS 0 |
|
#define | SV_FEATURES |
|
#define | MVD_SPAWN_DISABLED 0 |
|
#define | MVD_SPAWN_ENABLED 0x40000000 |
|
#define | MVD_SPAWN_INTERNAL 0x80000000 |
|
#define | MVD_SPAWN_MASK 0xc0000000 |
|
#define | SV_FRAMERATE BASE_FRAMERATE |
|
#define | SV_FRAMETIME BASE_FRAMETIME |
|
#define | SV_FRAMEDIV 1 |
|
#define | SV_FRAMESYNC 1 |
|
#define | SV_CLIENTSYNC(cl) 1 |
|
#define | EDICT_POOL(c, n) ((edict_t *)((byte *)(c)->pool->edicts + (c)->pool->edict_size*(n))) |
|
#define | EDICT_NUM(n) ((edict_t *)((byte *)ge->edicts + ge->edict_size*(n))) |
|
#define | NUM_FOR_EDICT(e) ((int)(((byte *)(e) - (byte *)ge->edicts) / ge->edict_size)) |
|
#define | MAX_TOTAL_ENT_LEAFS 128 |
|
#define | Q2PRO_SHORTANGLES(c, e) |
|
#define | MSG_POOLSIZE 1024 |
|
#define | MSG_TRESHOLD (64 - 10) |
|
#define | MSG_RELIABLE 1 |
|
#define | MSG_CLEAR 2 |
|
#define | MSG_COMPRESS 4 |
|
#define | MAX_SOUND_PACKET 14 |
|
#define | RATE_MESSAGES 10 |
|
#define | FOR_EACH_CLIENT(client) LIST_FOR_EACH(client_t, client, &sv_clientlist, entry) |
|
#define | PL_S2C(cl) |
|
#define | PL_C2S(cl) |
|
#define | AVG_PING(cl) |
|
#define | MAX_CHALLENGES 1024 |
|
#define | MAX_MASTERS 8 |
|
#define | HEARTBEAT_SECONDS 300 |
|
#define | FOR_EACH_MASTER(m) LIST_FOR_EACH(master_t, m, &sv_masterlist, entry) |
|
#define | FOR_EACH_MASTER_SAFE(m, n) LIST_FOR_EACH_SAFE(master_t, m, n, &sv_masterlist, entry) |
|
#define | SV_OUTPUTBUF_LENGTH (MAX_PACKETLEN_DEFAULT - 16) |
|
#define | SV_ClientRedirect() Com_BeginRedirect(RD_CLIENT, sv_outputbuf, MAX_STRING_CHARS - 1, SV_FlushRedirect) |
|
#define | SV_PacketRedirect() Com_BeginRedirect(RD_PACKET, sv_outputbuf, SV_OUTPUTBUF_LENGTH, SV_FlushRedirect) |
|
#define | SV_MvdRegister() (void)0 |
|
#define | SV_MvdInit() (void)0 |
|
#define | SV_MvdShutdown(type) (void)0 |
|
#define | SV_MvdBeginFrame() (void)0 |
|
#define | SV_MvdEndFrame() (void)0 |
|
#define | SV_MvdRunClients() (void)0 |
|
#define | SV_MvdStatus_f() (void)0 |
|
#define | SV_MvdMapChanged() (void)0 |
|
#define | SV_MvdClientDropped(client) (void)0 |
|
#define | SV_MvdUnicast(ent, clientNum, reliable) (void)0 |
|
#define | SV_MvdMulticast(leafnum, to) (void)0 |
|
#define | SV_MvdConfigstring(index, string, len) (void)0 |
|
#define | SV_MvdBroadcastPrint(level, string) (void)0 |
|
#define | SV_MvdStartSound(entnum, channel, flags, soundindex, volume, attenuation, timeofs) (void)0 |
|
#define | SV_MvdRecord_f() (void)0 |
|
#define | SV_MvdStop_f() (void)0 |
|
#define | AC_ClientConnect(cl) "" |
|
#define | AC_ClientDisconnect(cl) (void)0 |
|
#define | AC_ClientBegin(cl) qtrue |
|
#define | AC_ClientAnnounce(cl) (void)0 |
|
#define | AC_ClientToken(cl, token) (void)0 |
|
#define | AC_Register() (void)0 |
|
#define | AC_Disconnect() (void)0 |
|
#define | AC_Connect(mvd_spawn) (void)0 |
|
#define | AC_Run() (void)0 |
|
#define | AC_List_f() Com_Printf("This server does not support anticheat.\n") |
|
#define | AC_Info_f() Com_Printf("This server does not support anticheat.\n") |
|
#define | SV_AlignKeyFrames(client) (void)0 |
|
#define | ES_INUSE(s) ((s)->modelindex || (s)->effects || (s)->sound || (s)->event) |
|
|
enum | clstate_t {
cs_free,
cs_zombie,
cs_assigned,
cs_connected,
cs_primed,
cs_spawned
} |
|
enum | filteraction_t {
FA_IGNORE,
FA_PRINT,
FA_STUFF,
FA_KICK,
FA_MAX
} |
|
enum | redirect_t { RD_NONE,
RD_CLIENT,
RD_PACKET
} |
|
|
void | SV_DropClient (client_t *drop, const char *reason) |
|
void | SV_RemoveClient (client_t *client) |
|
void | SV_CleanClient (client_t *client) |
|
void | SV_InitOperatorCommands (void) |
|
void | SV_UserinfoChanged (client_t *cl) |
|
qboolean | SV_RateLimited (ratelimit_t *r) |
|
void | SV_RateRecharge (ratelimit_t *r) |
|
void | SV_RateInit (ratelimit_t *r, const char *s) |
|
addrmatch_t * | SV_MatchAddress (list_t *list, netadr_t *address) |
|
int | SV_CountClients (void) |
|
void | SV_ClientReset (client_t *client) |
|
void | SV_SpawnServer (mapcmd_t *cmd) |
|
qboolean | SV_ParseMapCmd (mapcmd_t *cmd) |
|
void | SV_InitGame (unsigned mvd_spawn) |
|
void | SV_FlushRedirect (int redirected, char *outputbuf, size_t len) |
|
void | SV_SendClientMessages (void) |
|
void | SV_SendAsyncPackets (void) |
|
void | SV_Multicast (vec3_t origin, multicast_t to) |
|
void | SV_ClientPrintf (client_t *cl, int level, const char *fmt,...) q_printf(3 |
|
void void | SV_BroadcastPrintf (int level, const char *fmt,...) q_printf(2 |
|
void void void | SV_ClientCommand (client_t *cl, const char *fmt,...) q_printf(2 |
|
void void void void | SV_BroadcastCommand (const char *fmt,...) q_printf(1 |
|
void void void void void | SV_ClientAddMessage (client_t *client, int flags) |
|
void | SV_ShutdownClientSend (client_t *client) |
|
void | SV_InitClientSend (client_t *newcl) |
|
void | SV_New_f (void) |
|
void | SV_Begin_f (void) |
|
void | SV_ExecuteClientMessage (client_t *cl) |
|
void | SV_CloseDownload (client_t *client) |
|
void | SV_AddMatch_f (list_t *list) |
|
void | SV_DelMatch_f (list_t *list) |
|
void | SV_ListMatches_f (list_t *list) |
|
client_t * | SV_GetPlayer (const char *s, qboolean partial) |
|
void | SV_PrintMiscInfo (void) |
|
void | SV_BuildProxyClientFrame (client_t *client) |
|
void | SV_BuildClientFrame (client_t *client) |
|
void | SV_WriteFrameToClient_Default (client_t *client) |
|
void | SV_WriteFrameToClient_Enhanced (client_t *client) |
|
void | SV_InitGameProgs (void) |
|
void | SV_ShutdownGameProgs (void) |
|
void | SV_InitEdict (edict_t *e) |
|
void | PF_Pmove (pmove_t *pm) |
|
void | SV_AutoSaveBegin (mapcmd_t *cmd) |
|
void | SV_AutoSaveEnd (void) |
|
void | SV_CheckForSavegame (mapcmd_t *cmd) |
|
void | SV_RegisterSavegames (void) |
|
int | SV_NoSaveGames (void) |
|
void | SV_ClearWorld (void) |
|
void | PF_UnlinkEdict (edict_t *ent) |
|
void | SV_LinkEdict (cm_t *cm, edict_t *ent) |
|
void | PF_LinkEdict (edict_t *ent) |
|
int | SV_AreaEdicts (vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype) |
|
qboolean | SV_EdictIsVisible (cm_t *cm, edict_t *ent, byte *mask) |
|
int | SV_PointContents (vec3_t p) |
|
trace_t q_gameabi | SV_Trace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passedict, int contentmask) |
|
◆ AC_ClientAnnounce
#define AC_ClientAnnounce |
( |
|
cl | ) |
(void)0 |
◆ AC_ClientBegin
#define AC_ClientBegin |
( |
|
cl | ) |
qtrue |
◆ AC_ClientConnect
#define AC_ClientConnect |
( |
|
cl | ) |
"" |
◆ AC_ClientDisconnect
#define AC_ClientDisconnect |
( |
|
cl | ) |
(void)0 |
◆ AC_ClientToken
#define AC_ClientToken |
( |
|
cl, |
|
|
|
token |
|
) |
| (void)0 |
◆ AC_Connect
#define AC_Connect |
( |
|
mvd_spawn | ) |
(void)0 |
◆ AC_Disconnect
#define AC_Disconnect |
( |
| ) |
(void)0 |
◆ AC_Info_f
#define AC_Info_f |
( |
| ) |
Com_Printf("This server does not support anticheat.\n") |
◆ AC_List_f
#define AC_List_f |
( |
| ) |
Com_Printf("This server does not support anticheat.\n") |
◆ AC_Register
#define AC_Register |
( |
| ) |
(void)0 |
◆ AC_Run
#define AC_Run |
( |
| ) |
(void)0 |
◆ AVG_PING
Value:
cl->avg_ping_time /
cl->avg_ping_count :
cl->ping)
Definition at line 246 of file server.h.
◆ EDICT_NUM
#define EDICT_NUM |
( |
|
n | ) |
((edict_t *)((byte *)ge->edicts + ge->edict_size*(n))) |
◆ EDICT_POOL
#define EDICT_POOL |
( |
|
c, |
|
|
|
n |
|
) |
| ((edict_t *)((byte *)(c)->pool->edicts + (c)->pool->edict_size*(n))) |
◆ ES_INUSE
#define ES_INUSE |
( |
|
s | ) |
((s)->modelindex || (s)->effects || (s)->sound || (s)->event) |
◆ FOR_EACH_CLIENT
◆ FOR_EACH_MASTER
◆ FOR_EACH_MASTER_SAFE
◆ HEARTBEAT_SECONDS
#define HEARTBEAT_SECONDS 300 |
◆ MAX_CHALLENGES
#define MAX_CHALLENGES 1024 |
◆ MAX_MASTERS
◆ MAX_SOUND_PACKET
#define MAX_SOUND_PACKET 14 |
◆ MAX_TOTAL_ENT_LEAFS
#define MAX_TOTAL_ENT_LEAFS 128 |
◆ MSG_CLEAR
◆ MSG_COMPRESS
◆ MSG_POOLSIZE
#define MSG_POOLSIZE 1024 |
◆ MSG_RELIABLE
◆ MSG_TRESHOLD
#define MSG_TRESHOLD (64 - 10) |
◆ MVD_SPAWN_DISABLED
#define MVD_SPAWN_DISABLED 0 |
◆ MVD_SPAWN_ENABLED
#define MVD_SPAWN_ENABLED 0x40000000 |
◆ MVD_SPAWN_INTERNAL
#define MVD_SPAWN_INTERNAL 0x80000000 |
◆ MVD_SPAWN_MASK
#define MVD_SPAWN_MASK 0xc0000000 |
◆ NUM_FOR_EDICT
#define NUM_FOR_EDICT |
( |
|
e | ) |
((int)(((byte *)(e) - (byte *)ge->edicts) / ge->edict_size)) |
◆ PL_C2S
Value: (
cl->netchan->total_received ? \
((float)
cl->netchan->total_dropped /
cl->netchan->total_received) * 100.0f : 0.0f)
Definition at line 244 of file server.h.
◆ PL_S2C
Value:
(1.0f - (float)
cl->frames_acked /
cl->frames_sent) * 100.0f : 0.0f)
Definition at line 242 of file server.h.
◆ Q2PRO_SHORTANGLES
#define Q2PRO_SHORTANGLES |
( |
|
c, |
|
|
|
e |
|
) |
| |
Value: ((
c)->protocol == PROTOCOL_VERSION_Q2PRO && \
(
c)->version >= PROTOCOL_VERSION_Q2PRO_SHORT_ANGLES && \
sv.state == ss_game && \
EDICT_POOL(
c, e)->solid == SOLID_BSP)
Definition at line 179 of file server.h.
◆ RATE_MESSAGES
◆ SV_AlignKeyFrames
#define SV_AlignKeyFrames |
( |
|
client | ) |
(void)0 |
◆ SV_BASELINES_CHUNKS
◆ SV_BASELINES_MASK
◆ SV_BASELINES_PER_CHUNK
◆ SV_BASELINES_SHIFT
#define SV_BASELINES_SHIFT 6 |
◆ SV_ClientRedirect
◆ SV_CLIENTSYNC
#define SV_CLIENTSYNC |
( |
|
cl | ) |
1 |
◆ SV_CopyString
◆ SV_DPrintf
#define SV_DPrintf |
( |
|
... | ) |
|
◆ SV_FEATURES
Value: (GMF_CLIENTNUM | GMF_PROPERINUSE | GMF_MVDSPEC | \
GMF_WANT_ALL_DISCONNECTS | GMF_ENHANCED_SAVEGAMES | \
SV_GMF_VARIABLE_FPS | GMF_EXTRA_USERINFO)
Definition at line 89 of file server.h.
◆ SV_FRAMEDIV
◆ SV_FRAMERATE
#define SV_FRAMERATE BASE_FRAMERATE |
◆ SV_FRAMESYNC
◆ SV_FRAMETIME
#define SV_FRAMETIME BASE_FRAMETIME |
◆ SV_FreeFile
#define SV_FreeFile |
( |
|
buf | ) |
Z_Free(buf) |
◆ SV_GMF_VARIABLE_FPS
#define SV_GMF_VARIABLE_FPS 0 |
◆ SV_InfoSet
#define SV_InfoSet |
( |
|
var, |
|
|
|
val |
|
) |
| Cvar_FullSet(var, val, CVAR_SERVERINFO|CVAR_ROM, FROM_CODE) |
◆ SV_LoadFile
#define SV_LoadFile |
( |
|
path, |
|
|
|
buf |
|
) |
| FS_LoadFileEx(path, buf, 0, TAG_SERVER) |
◆ SV_Malloc
#define SV_Malloc |
( |
|
size | ) |
Z_TagMalloc(size, TAG_SERVER) |
◆ SV_Mallocz
◆ SV_MvdBeginFrame
#define SV_MvdBeginFrame |
( |
| ) |
(void)0 |
◆ SV_MvdBroadcastPrint
#define SV_MvdBroadcastPrint |
( |
|
level, |
|
|
|
string |
|
) |
| (void)0 |
◆ SV_MvdClientDropped
#define SV_MvdClientDropped |
( |
|
client | ) |
(void)0 |
◆ SV_MvdConfigstring
#define SV_MvdConfigstring |
( |
|
index, |
|
|
|
string, |
|
|
|
len |
|
) |
| (void)0 |
◆ SV_MvdEndFrame
#define SV_MvdEndFrame |
( |
| ) |
(void)0 |
◆ SV_MvdInit
#define SV_MvdInit |
( |
| ) |
(void)0 |
◆ SV_MvdMapChanged
#define SV_MvdMapChanged |
( |
| ) |
(void)0 |
◆ SV_MvdMulticast
#define SV_MvdMulticast |
( |
|
leafnum, |
|
|
|
to |
|
) |
| (void)0 |
◆ SV_MvdRecord_f
#define SV_MvdRecord_f |
( |
| ) |
(void)0 |
◆ SV_MvdRegister
#define SV_MvdRegister |
( |
| ) |
(void)0 |
◆ SV_MvdRunClients
#define SV_MvdRunClients |
( |
| ) |
(void)0 |
◆ SV_MvdShutdown
#define SV_MvdShutdown |
( |
|
type | ) |
(void)0 |
◆ SV_MvdStartSound
#define SV_MvdStartSound |
( |
|
entnum, |
|
|
|
channel, |
|
|
|
flags, |
|
|
|
soundindex, |
|
|
|
volume, |
|
|
|
attenuation, |
|
|
|
timeofs |
|
) |
| (void)0 |
◆ SV_MvdStatus_f
#define SV_MvdStatus_f |
( |
| ) |
(void)0 |
◆ SV_MvdStop_f
#define SV_MvdStop_f |
( |
| ) |
(void)0 |
◆ SV_MvdUnicast
#define SV_MvdUnicast |
( |
|
ent, |
|
|
|
clientNum, |
|
|
|
reliable |
|
) |
| (void)0 |
◆ SV_OUTPUTBUF_LENGTH
#define SV_OUTPUTBUF_LENGTH (MAX_PACKETLEN_DEFAULT - 16) |
◆ SV_PacketRedirect
◆ SV_PAUSED
◆ client_t
◆ server_static_t
◆ clstate_t
Enumerator |
---|
cs_free | |
cs_zombie | |
cs_assigned | |
cs_connected | |
cs_primed | |
cs_spawned | |
Definition at line 185 of file server.h.
◆ filteraction_t
Enumerator |
---|
FA_IGNORE | |
FA_PRINT | |
FA_STUFF | |
FA_KICK | |
FA_MAX | |
Definition at line 410 of file server.h.
◆ redirect_t
Enumerator |
---|
RD_NONE | |
RD_CLIENT | |
RD_PACKET | |
Definition at line 581 of file server.h.
◆ PF_LinkEdict()
void PF_LinkEdict |
( |
edict_t * |
ent | ) |
|
Definition at line 264 of file world.c.
276 if (ent ==
ge->edicts)
280 Com_DPrintf(
"%s: entity %d is not in use\n", __func__,
NUM_FOR_EDICT(ent));
292 switch (ent->solid) {
294 if ((ent->svflags & SVF_DEADMONSTER) || VectorCompare(ent->mins, ent->maxs)) {
298 ent->s.solid = MSG_PackSolid16(ent->mins, ent->maxs);
299 sent->
solid32 = MSG_PackSolid32(ent->mins, ent->maxs);
303 ent->s.solid = PACKED_BSP;
315 if (!ent->linkcount) {
316 VectorCopy(ent->s.origin, ent->s.old_origin);
318 VectorCopy(ent->s.origin, sent->create_origin);
327 VectorCopy(ent->s.origin, sent->history[i].origin);
331 if (ent->solid == SOLID_NOT)
337 if (node->
axis == -1)
339 if (ent->absmin[node->
axis] > node->
dist)
341 else if (ent->absmax[node->
axis] < node->
dist)
348 if (ent->solid == SOLID_TRIGGER)
Referenced by PF_setmodel(), and SV_InitGameProgs().
◆ PF_Pmove()
void PF_Pmove |
( |
pmove_t * |
pm | ) |
|
◆ PF_UnlinkEdict()
void PF_UnlinkEdict |
( |
edict_t * |
ent | ) |
|
◆ SV_AddMatch_f()
void SV_AddMatch_f |
( |
list_t * |
list | ) |
|
Definition at line 1082 of file commands.c.
1084 char *s, buf[MAX_QPATH];
1086 netadr_t addr, mask;
1090 Com_Printf(
"Usage: %s <address[/mask]> [comment]\n",
Cmd_Argv(0));
1100 if (NET_IsEqualBaseAdr(&match->
addr, &addr) &&
1101 NET_IsEqualBaseAdr(&match->
mask, &mask)) {
1103 Com_Printf(
"Entry %s already exists.\n", buf);
1110 match = Z_Malloc(
sizeof(*match) + len);
1115 memcpy(match->
comment, s, len + 1);
1116 List_Append(list, &match->
entry);
Referenced by AC_AddException_f(), AC_AddRequirement_f(), SV_AddBan_f(), SV_AddBlackHole_f(), SV_AddGtvBan_f(), and SV_AddGtvHost_f().
◆ SV_AreaEdicts()
int SV_AreaEdicts |
( |
vec3_t |
mins, |
|
|
vec3_t |
maxs, |
|
|
edict_t ** |
list, |
|
|
int |
maxcount, |
|
|
int |
areatype |
|
) |
| |
◆ SV_AutoSaveBegin()
Definition at line 474 of file save.c.
476 byte bitmap[MAX_CLIENTS / CHAR_BIT];
492 memset(bitmap, 0,
sizeof(bitmap));
507 Com_EPrintf(
"Couldn't write level file.\n");
512 ent->inuse = Q_IsBitSet(bitmap, i);
Referenced by SV_Map().
◆ SV_AutoSaveEnd()
Definition at line 516 of file save.c.
527 Com_EPrintf(
"Couldn't write level file.\n");
533 Com_EPrintf(
"Couldn't write server file.\n");
539 Com_EPrintf(
"Couldn't wipe '%s' directory.\n",
SAVE_AUTO);
545 Com_EPrintf(
"Couldn't write '%s' directory.\n",
SAVE_AUTO);
Referenced by SV_Begin_f(), and SV_Map().
◆ SV_Begin_f()
Definition at line 488 of file user.c.
494 Com_DPrintf(
"Begin not valid -- not yet primed\n");
499 Com_DPrintf(
"Begin not valid -- already spawned\n");
517 Com_DPrintf(
"Going from cs_primed to cs_spawned for %s\n",
Referenced by AC_CheckTimeouts(), and AC_ParseQueryReply().
◆ SV_BroadcastCommand()
◆ SV_BroadcastPrintf()
void void SV_BroadcastPrintf |
( |
int |
level, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ SV_BuildClientFrame()
Definition at line 382 of file entities.c.
389 entity_packed_t *state;
393 int clientarea, clientcluster;
395 byte clientphs[VIS_MAX_BYTES];
396 byte clientpvs[VIS_MAX_BYTES];
397 qboolean ent_visible;
398 int cull_nonvisible_entities =
Cvar_Get(
"sv_cull_nonvisible_entities",
"1", CVAR_CHEAT)->integer;
400 clent = client->
edict;
413 ps = &clent->client->ps;
414 VectorMA(ps->viewoffset, 0.125f, ps->pmove.origin, org);
417 clientarea = CM_LeafArea(leaf);
418 clientcluster = CM_LeafCluster(leaf);
432 frame->
clientNum = clent->client->clientNum;
437 if (clientcluster >= 0)
453 for (e = 1; e < client->
pool->num_edicts; e++) {
457 if (!ent->inuse && (
g_features->integer & GMF_PROPERINUSE)) {
462 if (ent->svflags & SVF_NOCLIENT)
466 if (!ent->s.modelindex && !ent->s.effects && !ent->s.sound) {
470 if (ent->s.event == EV_FOOTSTEP && client->
settings[CLS_NOFOOTSTEPS]) {
475 if ((ent->s.effects & EF_GIB) && client->
settings[CLS_NOGIBS]) {
488 ent_visible = qfalse;
495 if (ent->s.renderfx & RF_BEAM) {
496 l = ent->clusternums[0];
497 if (!Q_IsBitSet(clientphs, l))
498 ent_visible = qfalse;
502 ent_visible = qfalse;
505 if (!ent->s.modelindex) {
510 VectorSubtract(org, ent->s.origin, delta);
511 len = VectorLength(delta);
513 ent_visible = qfalse;
519 if(!ent_visible && (!
sv_novis->integer || !ent->s.modelindex))
522 if (ent->s.number != e) {
523 Com_WPrintf(
"%s: fixing ent->s.number: %d to %d\n",
524 __func__, ent->s.number, e);
528 memcpy(&es, &ent->s,
sizeof(entity_state_t));
542 if (client->framediv != 1)
543 fix_old_origin(client, state, ent, e);
547 if (state->event == EV_FOOTSTEP && client->
settings[CLS_NOFOOTSTEPS]) {
552 if (e == frame->
clientNum + 1 && ent != clent &&
554 state->modelindex = 0;
558 if (
sv.
state == ss_broadcast) {
560 if (state->solid != PACKED_BSP)
564 if (ent->owner == clent) {
567 }
else if (client->
esFlags & MSG_ES_LONGSOLID) {
Referenced by SV_SendClientMessages().
◆ SV_BuildProxyClientFrame()
◆ SV_CheckForSavegame()
Definition at line 550 of file save.c.
559 Com_EPrintf(
"Couldn't read level file.\n");
572 for (i = 0; i < 100; i++)
Referenced by SV_SpawnServer().
◆ SV_CleanClient()
Definition at line 135 of file main.c.
139 string_entry_t *bad, *next;
141 for (bad = client->ac_bad_files; bad; bad = next) {
145 client->ac_bad_files = NULL;
Referenced by SV_DropClient(), and SV_FinalMessage().
◆ SV_ClearWorld()
◆ SV_ClientAddMessage()
Definition at line 399 of file send.c.
401 SV_DPrintf(1,
"Added %sreliable message to %s: %"PRIz
" bytes\n",
Referenced by AC_Announce(), handle_filtercmd(), MVD_BroadcastPrintf(), MVD_ChangeLevel(), MVD_LayoutChannels(), MVD_LayoutClients(), MVD_LayoutFollow(), MVD_LayoutMenu(), MVD_LayoutScores(), MVD_ParseSound(), MVD_SwitchChannel(), MVD_UpdateConfigstring(), PF_bprintf(), PF_configstring(), PF_cprintf(), PF_StartSound(), PF_Unicast(), stuff_cmds(), SV_BeginDownload_f(), SV_BroadcastCommand(), SV_BroadcastPrintf(), SV_ClientCommand(), SV_ClientPrintf(), SV_DropClient(), SV_FlushRedirect(), SV_Multicast(), SV_New_f(), SV_StopDownload_f(), SV_Stuff_f(), SV_StuffAll_f(), write_cs_list(), write_plain_baselines(), and write_plain_configstrings().
◆ SV_ClientCommand()
◆ SV_ClientPrintf()
◆ SV_ClientReset()
◆ SV_CloseDownload()
◆ SV_CountClients()
◆ SV_DelMatch_f()
void SV_DelMatch_f |
( |
list_t * |
list | ) |
|
Definition at line 1119 of file commands.c.
1123 netadr_t addr, mask;
1127 Com_Printf(
"Usage: %s <address[/mask]|id|all>\n",
Cmd_Argv(0));
1131 if (LIST_EMPTY(list)) {
1132 Com_Printf(
"Address list is empty.\n");
1137 if (!strcmp(s,
"all")) {
1138 LIST_FOR_EACH_SAFE(
addrmatch_t, match, next, list, entry) {
1149 Com_Printf(
"Bad index: %d\n", i);
1152 match = LIST_INDEX(
addrmatch_t, i - 1, list, entry);
1156 Com_Printf(
"No such index: %d\n", i);
1165 if (NET_IsEqualBaseAdr(&match->
addr, &addr) &&
1166 NET_IsEqualBaseAdr(&match->
mask, &mask)) {
1168 List_Remove(&match->
entry);
1173 Com_Printf(
"No such entry: %s\n", s);
Referenced by AC_DelException_f(), AC_DelRequirement_f(), SV_DelBan_f(), SV_DelBlackHole_f(), SV_DelGtvBan_f(), and SV_DelGtvHost_f().
◆ SV_DropClient()
Definition at line 212 of file main.c.
219 oldstate = client->state;
234 ge->ClientDisconnect(client->edict);
241 Com_DPrintf(
"Going to cs_zombie for %s\n", client->name);
Referenced by AC_ClientBegin(), AC_ClientToken(), AC_ParseDisconnect(), AC_ParseFileViolation(), AC_ParseQueryReply(), AC_ParseViolation(), add_message_old(), add_msg_packet(), find_client_slot(), handle_filtercmd(), mvd_disable(), SV_Begin_f(), SV_CheckTimeouts(), SV_Disconnect_f(), SV_ExecuteClientMessage(), SV_Kick_f(), SV_New_f(), SV_NewClientExecuteMove(), SV_OldClientExecuteMove(), SV_ParseClientCommand(), SV_ParseDeltaUserinfo(), SV_ParseFullUserinfo(), SV_SendClientMessages(), and SV_UpdateUserinfo().
◆ SV_EdictIsVisible()
qboolean SV_EdictIsVisible |
( |
cm_t * |
cm, |
|
|
edict_t * |
ent, |
|
|
byte * |
mask |
|
) |
| |
◆ SV_ExecuteClientMessage()
Definition at line 1482 of file user.c.
1507 switch (
c & SVCMD_MASK) {
1529 if (client->protocol < PROTOCOL_VERSION_R1Q2)
1535 case clc_move_nodelta:
1536 case clc_move_batched:
1537 if (client->protocol != PROTOCOL_VERSION_Q2PRO)
1543 case clc_userinfo_delta:
1544 if (client->protocol != PROTOCOL_VERSION_Q2PRO)
Referenced by SV_PacketEvent().
◆ SV_FlushRedirect()
void SV_FlushRedirect |
( |
int |
redirected, |
|
|
char * |
outputbuf, |
|
|
size_t |
len |
|
) |
| |
Definition at line 32 of file send.c.
34 byte buffer[MAX_PACKETLEN_DEFAULT];
37 memcpy(buffer,
"\xff\xff\xff\xffprint\n", 10);
38 memcpy(buffer + 10, outputbuf, len);
43 MSG_WriteData(outputbuf, len);
◆ SV_GetPlayer()
client_t* SV_GetPlayer |
( |
const char * |
s, |
|
|
qboolean |
partial |
|
) |
| |
Definition at line 127 of file commands.c.
140 Com_Printf(
"Bad client slot number: %d\n", i);
146 Com_Printf(
"Client slot %d is not active.\n", i);
157 if (!strcmp(
other->name, s)) {
163 Com_Printf(
"Userid '%s' is not on the server.\n", s);
174 if (!Q_stricmp(
other->name, s)) {
177 if (Q_stristr(
other->name, s)) {
184 Com_Printf(
"No clients matching '%s' found.\n", s);
189 Com_Printf(
"'%s' matches multiple clients.\n", s);
Referenced by SV_Lag_f(), and SV_SetPlayer().
◆ SV_InitClientSend()
◆ SV_InitEdict()
void SV_InitEdict |
( |
edict_t * |
e | ) |
|
◆ SV_InitGame()
void SV_InitGame |
( |
unsigned |
mvd_spawn | ) |
|
Definition at line 361 of file init.c.
369 SV_Shutdown(
"Server restarted\n", ERR_RECONNECT | mvd_spawn);
377 memset(&
sv, 0,
sizeof(
sv));
381 sv.frametime = BASE_FRAMETIME;
398 Com_Printf(
"Deathmatch and Coop both set, disabling Coop\n");
421 Cvar_FullSet(
"maxclients",
"1", CVAR_SERVERINFO | CVAR_LATCH, FROM_CODE);
442 svs.z.zalloc = SV_zalloc;
443 svs.z.zfree = SV_zfree;
444 if (deflateInit2(&
svs.z, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
445 -MAX_WBITS, 9, Z_DEFAULT_STRATEGY) != Z_OK) {
446 Com_Error(ERR_FATAL,
"%s: deflateInit2() failed", __func__);
469 ent->s.number = entnum;
Referenced by MVD_ChangeLevel(), MVD_Spawn_f(), parse_hello(), read_server_file(), and SV_Map().
◆ SV_InitGameProgs()
Definition at line 841 of file game.c.
843 game_import_t
import;
844 game_export_t *(*entry)(game_import_t *) = NULL;
854 if (!entry &&
fs_game->string[0]) {
869 Com_Error(ERR_DROP,
"Failed to load game library");
928 Com_Error(ERR_DROP,
"Game DLL returned NULL exports");
931 if (
ge->apiversion != GAME_API_VERSION) {
932 Com_Error(ERR_DROP,
"Game DLL is version %d, expected %d",
933 ge->apiversion, GAME_API_VERSION);
940 if (
ge->edict_size <
sizeof(edict_t) ||
ge->edict_size > SIZE_MAX / MAX_EDICTS) {
941 Com_Error(ERR_DROP,
"Game DLL returned bad size of edict_t");
946 Com_Error(ERR_DROP,
"Game DLL returned bad number of max_edicts");
Referenced by SV_InitGame().
◆ SV_InitOperatorCommands()
◆ SV_LinkEdict()
void SV_LinkEdict |
( |
cm_t * |
cm, |
|
|
edict_t * |
ent |
|
) |
| |
Definition at line 156 of file world.c.
166 VectorSubtract(ent->maxs, ent->mins, ent->size);
169 if (ent->solid == SOLID_BSP &&
170 (ent->s.angles[0] || ent->s.angles[1] || ent->s.angles[2])) {
176 for (i = 0; i < 3; i++) {
177 v = Q_fabs(ent->mins[i]);
180 v = Q_fabs(ent->maxs[i]);
184 for (i = 0; i < 3; i++) {
185 ent->absmin[i] = ent->s.origin[i] - max;
186 ent->absmax[i] = ent->s.origin[i] + max;
190 VectorAdd(ent->s.origin, ent->mins, ent->absmin);
191 VectorAdd(ent->s.origin, ent->maxs, ent->absmax);
204 ent->num_clusters = 0;
209 num_leafs =
CM_BoxLeafs(cm, ent->absmin, ent->absmax,
213 for (i = 0; i < num_leafs; i++) {
214 clusters[i] = CM_LeafCluster(leafs[i]);
215 area = CM_LeafArea(leafs[i]);
219 if (ent->areanum && ent->areanum != area) {
220 if (ent->areanum2 && ent->areanum2 != area &&
sv.
state == ss_loading) {
221 Com_DPrintf(
"Object touching 3 areas at %f %f %f\n",
222 ent->absmin[0], ent->absmin[1], ent->absmin[2]);
224 ent->areanum2 = area;
232 ent->num_clusters = -1;
233 ent->headnode = CM_NumNode(cm, topnode);
235 ent->num_clusters = 0;
236 for (i = 0; i < num_leafs; i++) {
237 if (clusters[i] == -1)
239 for (j = 0; j < i; j++)
240 if (clusters[j] == clusters[i])
243 if (ent->num_clusters == MAX_ENT_CLUSTERS) {
245 ent->num_clusters = -1;
246 ent->headnode = CM_NumNode(cm, topnode);
250 ent->clusternums[ent->num_clusters++] = clusters[i];
Referenced by MVD_LinkEdict(), and PF_LinkEdict().
◆ SV_ListMatches_f()
void SV_ListMatches_f |
( |
list_t * |
list | ) |
|
Definition at line 1176 of file commands.c.
1179 char last[MAX_QPATH];
1180 char addr[MAX_QPATH];
1183 if (LIST_EMPTY(list)) {
1184 Com_Printf(
"Address list is empty.\n");
1188 Com_Printf(
"id address/mask hits last hit comment\n"
1189 "-- ------------------ ---- ------------ -------\n");
1194 strcpy(last,
"never");
1196 struct tm *tm = localtime(&match->
time);
1197 if (!tm || !strftime(last,
sizeof(last),
"%d %b %H:%M", tm))
1198 strcpy(last,
"???");
1200 Com_Printf(
"%-2d %-18s %-4u %-12s %s\n", count, addr,
Referenced by AC_ListExceptions_f(), AC_ListRequirements_f(), SV_ListBans_f(), SV_ListBlackHoles_f(), SV_ListGtvBans_f(), and SV_ListGtvHosts_f().
◆ SV_MatchAddress()
addrmatch_t* SV_MatchAddress |
( |
list_t * |
list, |
|
|
netadr_t * |
address |
|
) |
| |
◆ SV_Multicast()
void SV_Multicast |
( |
vec3_t |
origin, |
|
|
multicast_t |
to |
|
) |
| |
Definition at line 255 of file send.c.
258 byte mask[VIS_MAX_BYTES];
259 mleaf_t *leaf1, *leaf2;
260 int leafnum q_unused;
265 Com_Error(ERR_DROP,
"%s: no map loaded", __func__);
271 case MULTICAST_ALL_R:
278 case MULTICAST_PHS_R:
283 leafnum = leaf1 -
sv.
cm.cache->leafs;
286 case MULTICAST_PVS_R:
291 leafnum = leaf1 -
sv.
cm.cache->leafs;
295 Com_Error(ERR_DROP,
"SV_Multicast: bad to: %i", to);
312 player_state_t *ps = &client->
edict->client->ps;
313 VectorMA(ps->viewoffset, 0.125f, ps->pmove.origin, org);
317 VectorCopy(client->
edict->s.origin, org);
322 if (leaf2->cluster == -1)
324 if (!Q_IsBitSet(mask, leaf2->cluster))
Referenced by PF_PositionedSound(), and SV_InitGameProgs().
◆ SV_New_f()
Definition at line 365 of file user.c.
373 Com_DPrintf(
"Going from cs_assigned to cs_connected for %s\n",
379 Com_DPrintf(
"New not valid -- already primed\n");
415 case PROTOCOL_VERSION_R1Q2:
421 case PROTOCOL_VERSION_Q2PRO:
442 "cmd \177c actoken $actoken\n"
454 Com_DPrintf(
"Going from cs_connected to cs_primed for %s\n",
466 write_compressed_gamestate();
469 write_compressed_configstrings();
Referenced by SV_Begin_f().
◆ SV_NoSaveGames()
◆ SV_ParseMapCmd()
qboolean SV_ParseMapCmd |
( |
mapcmd_t * |
cmd | ) |
|
Definition at line 285 of file init.c.
287 char expanded[MAX_QPATH];
305 Cvar_Set(
"nextserver",
va(
"gamemap \"%s\"", ch + 1));
322 if (!COM_CompareExtension(s,
".pcx")) {
323 len =
Q_concat(expanded,
sizeof(expanded),
"pics/", s, NULL);
324 if (len >=
sizeof(expanded)) {
325 ret = Q_ERR_NAMETOOLONG;
327 ret = FS_LoadFile(expanded, NULL);
331 else if (!COM_CompareExtension(s,
".cin")) {
333 cmd->
state = ss_cinematic;
336 len =
Q_concat(expanded,
sizeof(expanded),
"maps/", s,
".bsp", NULL);
337 if (len >=
sizeof(expanded)) {
338 ret = Q_ERR_NAMETOOLONG;
342 cmd->
state = ss_game;
346 Com_Printf(
"Couldn't load %s: %s\n", expanded,
Q_ErrorString(ret));
Referenced by read_server_file(), and SV_Map().
◆ SV_PointContents()
int SV_PointContents |
( |
vec3_t |
p | ) |
|
Definition at line 454 of file world.c.
456 edict_t *touch[MAX_EDICTS], *hit;
461 Com_Error(ERR_DROP,
"%s: no map loaded", __func__);
470 for (i = 0; i < num; i++) {
475 hit->s.origin, hit->s.angles);
Referenced by SV_InitGameProgs().
◆ SV_PrintMiscInfo()
Definition at line 777 of file commands.c.
779 char buffer[MAX_QPATH];
781 Com_Printf(
"version %s\n",
783 Com_Printf(
"protocol (maj/min) %d/%d\n",
793 Com_Printf(
"RTT (min/avg/max) %d/%d/%d ms\n",
795 Com_Printf(
"PL server to client %.2f%% (approx)\n",
PL_S2C(
sv_client));
802 Com_Printf(
"connection time %s\n", buffer);
Referenced by SV_DumpUser_f(), and SV_ShowMiscInfo_f().
◆ SV_RateInit()
Definition at line 309 of file main.c.
311 unsigned limit, period, mult, burst, rate;
314 limit = strtoul(s, &p, 10);
316 period = strtoul(p + 1, &p, 10);
317 if (*p ==
's' || *p ==
'S') {
320 }
else if (*p ==
'm' || *p ==
'M') {
323 }
else if (*p ==
'h' || *p ==
'H') {
340 memset(r, 0,
sizeof(*r));
345 Com_Printf(
"Period too large: %u\n", period);
353 burst = strtoul(p + 1, NULL, 10);
359 if (burst > UINT_MAX / rate) {
360 Com_Printf(
"Burst too large: %u\n", burst);
Referenced by init_rate_limits(), sv_auth_limit_changed(), sv_namechange_limit_changed(), sv_rcon_limit_changed(), sv_status_limit_changed(), and SVC_DirectConnect().
◆ SV_RateLimited()
◆ SV_RateRecharge()
◆ SV_RegisterSavegames()
◆ SV_RemoveClient()
◆ SV_SendAsyncPackets()
Definition at line 987 of file send.c.
1003 if (netchan->fragment_pending) {
1004 cursize = netchan->TransmitNextFragment(netchan);
1018 if (netchan->reliable_length && !retransmit && client->
state !=
cs_zombie) {
1023 if (netchan->type == NETCHAN_OLD) {
1030 if (netchan->message.cursize || netchan->reliable_ack_pending ||
1031 netchan->reliable_length || retransmit) {
1032 cursize = netchan->Transmit(netchan, 0, NULL, 1);
Referenced by MVD_ChangeLevel(), SV_Frame(), and SV_SpawnServer().
◆ SV_SendClientMessages()
Definition at line 880 of file send.c.
893 #if (defined _DEBUG) && USE_FPS
894 if (developer->integer)
895 check_key_sync(client);
900 if (client->
netchan->message.overflowed) {
911 if (client->
netchan->fragment_pending) {
Referenced by SV_Frame(), and SV_SpawnServer().
◆ SV_ShutdownClientSend()
◆ SV_ShutdownGameProgs()
◆ SV_SpawnServer()
Definition at line 139 of file init.c.
147 Com_Printf(
"------- Server Initialization -------\n");
148 Com_Printf(
"SpawnServer: %s\n", cmd->
server);
150 static qboolean warning_printed = qfalse;
153 Com_Printf(
"\nWARNING: Dedicated coop servers save game state into the same place as single player game by default (currently '%s/%s'). "
154 "To override that, set the 'sv_savedir' console variable. To host multiple dedicated coop servers on one machine, set that cvar "
155 "to different values on different instances of the server.\n\n",
fs_gamedir,
Cvar_WeakGet(
"sv_savedir")->
string);
157 warning_printed = qtrue;
174 memset(&
sv, 0,
sizeof(
sv));
202 if (cmd->
state == ss_game) {
210 for (i = 1; i <
sv.
cm.cache->nummodels; i++) {
269 SV_SetConsoleTitle();
274 Com_Printf(
"-------------------------------------\n");
Referenced by read_server_file(), and SV_Map().
◆ SV_Trace()
trace_t q_gameabi SV_Trace |
( |
vec3_t |
start, |
|
|
vec3_t |
mins, |
|
|
vec3_t |
maxs, |
|
|
vec3_t |
end, |
|
|
edict_t * |
passedict, |
|
|
int |
contentmask |
|
) |
| |
Definition at line 546 of file world.c.
552 Com_Error(ERR_DROP,
"%s: no map loaded", __func__);
557 Com_EPrintf(
"%s: runaway loop avoided\n", __func__);
558 memset(&trace, 0,
sizeof(trace));
560 trace.ent =
ge->edicts;
561 VectorCopy(end, trace.endpos);
572 CM_BoxTrace(&trace, start, end, mins, maxs,
sv.
cm.cache->nodes, contentmask);
573 trace.ent =
ge->edicts;
574 if (trace.fraction == 0) {
Referenced by SV_InitGameProgs().
◆ SV_UserinfoChanged()
Definition at line 1927 of file main.c.
1929 char name[MAX_CLIENT_NAME];
1935 ge->ClientUserinfoChanged(
cl->edict,
cl->userinfo);
1939 len =
Q_strlcpy(name, val,
sizeof(name));
1940 if (len >=
sizeof(name)) {
1941 len =
sizeof(name) - 1;
1944 for (i = 0; i < len; i++)
1946 if (
cl->name[0] && strcmp(
cl->name, name)) {
1947 if (COM_DEDICATED) {
1948 Com_Printf(
"%s[%s] changed name to %s\n",
cl->name,
1952 if (
sv.
state == ss_broadcast) {
1961 memcpy(
cl->name, name, len + 1);
1966 cl->rate = atoi(val);
1967 clamp(
cl->rate, 100, 15000);
1973 if (NET_IsLocalAddress(&
cl->netchan->remote_address)) {
1979 NET_IsLanAddress(&
cl->netchan->remote_address)) {
1986 cl->messagelevel = atoi(val);
1987 clamp(
cl->messagelevel, PRINT_LOW, PRINT_CHAT + 1);
Referenced by dummy_create(), SV_UpdateUserinfo(), and SVC_DirectConnect().
◆ SV_WriteFrameToClient_Default()
◆ SV_WriteFrameToClient_Enhanced()
Definition at line 218 of file entities.c.
221 player_packed_t *oldstate;
223 int delta, suppressed;
225 msgPsFlags_t psFlags;
234 oldstate = &oldframe->
ps;
255 if (!client->
settings[CLS_RECORDING]) {
257 psFlags |= MSG_PS_IGNORE_GUNFRAMES;
258 if (client->
settings[CLS_NOGUN] != 2) {
259 psFlags |= MSG_PS_IGNORE_GUNINDEX;
262 if (client->
settings[CLS_NOBLEND]) {
263 psFlags |= MSG_PS_IGNORE_BLEND;
265 if (frame->
ps.pmove.pm_type < PM_DEAD) {
266 if (!(frame->
ps.pmove.pm_flags & PMF_NO_PREDICTION)) {
267 psFlags |= MSG_PS_IGNORE_VIEWANGLES;
271 psFlags |= MSG_PS_IGNORE_DELTAANGLES;
276 if (client->
protocol == PROTOCOL_VERSION_Q2PRO) {
277 if (frame->
ps.pmove.pm_type < PM_DEAD && !client->
settings[CLS_RECORDING]) {
280 if (client->
settings[CLS_NOPREDICT]) {
281 psFlags |= MSG_PS_IGNORE_PREDICTION;
291 if (client->
protocol == PROTOCOL_VERSION_Q2PRO) {
293 if (client->
version < PROTOCOL_VERSION_Q2PRO_CLIENTNUM_FIX) {
295 extraflags |= EPS_CLIENTNUM;
299 int clientNum = oldframe ? oldframe->
clientNum : 0;
301 extraflags |= EPS_CLIENTNUM;
308 *b1 = svc_frame | (((extraflags & 0x70) << 1));
311 *b2 = (suppressed & SUPPRESSCOUNT_MASK) |
312 ((extraflags & 0x0F) << SUPPRESSCOUNT_BITS);
Referenced by SVC_DirectConnect().
◆ g_features
Definition at line 99 of file main.c.
Referenced by append_extra_userinfo(), create_baselines(), dummy_create(), entity_is_active(), parse_userinfo(), PF_StartSound(), player_is_active(), read_server_file(), set_frame_time(), SV_BuildClientFrame(), SV_DropClient(), SV_Init(), SV_NoSaveGames(), SV_Savegame_f(), and userinfo_ip_string().
◆ ge
Definition at line 22 of file game.c.
Referenced by build_gamestate(), dummy_command(), dummy_create(), dummy_run(), dummy_spawn(), emit_frame(), PF_LinkEdict(), read_level_file(), read_server_file(), SV_Begin_f(), SV_CheckForSavegame(), SV_ClearWorld(), SV_ClientThink(), SV_DropClient(), SV_ExecuteUserCommand(), SV_InitGame(), SV_InitGameProgs(), SV_PrepWorldFrame(), SV_RunGameFrame(), SV_ServerCommand_f(), SV_Shutdown(), SV_ShutdownGameProgs(), SV_SpawnServer(), SV_Trace(), SV_UserinfoChanged(), SVC_DirectConnect(), write_level_file(), and write_server_file().
◆ map_override_path
cvar_t* map_override_path |
◆ sv
Definition at line 22 of file init.c.
Referenced by create_baselines(), emit_frame(), emit_gamestate(), MVD_ChangeLevel(), MVD_Frame(), MVD_GameInit(), MVD_Spawn(), override_entity_string(), parse_hello(), PF_AreasConnected(), PF_configstring(), PF_FindIndex(), PF_inVIS(), PF_LinkEdict(), PF_SetAreaPortalState(), PF_setmodel(), PF_StartSound(), print_drop_reason(), Qcommon_Frame(), read_level_file(), set_frame_time(), should_really_restart(), SV_AutoSaveBegin(), SV_AutoSaveEnd(), SV_BuildClientFrame(), SV_CalcPings(), SV_ClearWorld(), SV_DumpEnts_f(), SV_ExecuteUserCommand(), SV_Frame(), SV_GiveMsec(), SV_HullForEntity(), SV_Init(), SV_InitGame(), SV_LinkEdict(), SV_Map(), SV_Multicast(), SV_MvdRecord_f(), SV_New_f(), SV_NextServer_f(), SV_PointContents(), SV_PrepWorldFrame(), SV_RateDrop(), SV_RemoveClient(), SV_Savegame_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), SV_Trace(), SV_UserinfoChanged(), SVC_DirectConnect(), SVC_Info(), write_level_file(), and write_server_file().
◆ sv_airaccelerate
◆ sv_allow_map
◆ sv_allow_unconnected_cmds
cvar_t* sv_allow_unconnected_cmds |
◆ sv_auth_limit
◆ sv_banlist
◆ sv_blacklist
◆ sv_calcpings_method
cvar_t* sv_calcpings_method |
◆ sv_changemapcmd
◆ sv_client
Definition at line 32 of file main.c.
Referenced by AC_CheckTimeouts(), AC_Info_f(), AC_ParseQueryReply(), create_baselines(), dummy_command(), dummy_create(), dummy_run(), dummy_spawn(), handle_filtercmd(), PF_Pmove(), stuff_cmds(), stuff_junk(), SV_Begin_f(), SV_BeginDownload_f(), SV_ClientThink(), SV_CvarResult_f(), SV_Disconnect_f(), SV_DumpUser_f(), SV_ExecuteClientMessage(), SV_ExecuteUserCommand(), SV_FlushRedirect(), SV_Kick_f(), SV_Lag_f(), SV_New_f(), SV_NewClientExecuteMove(), SV_NextDownload_f(), SV_NoGameData_f(), SV_OldClientExecuteMove(), SV_ParseClientCommand(), SV_ParseClientSetting(), SV_ParseDeltaUserinfo(), SV_ParseFullUserinfo(), SV_PrintMiscInfo(), SV_SetLastFrame(), SV_SetPlayer(), SV_Shutdown(), SV_StopDownload_f(), SV_Stuff_f(), SV_StuffCvar_f(), SV_UpdateUserinfo(), SVC_DirectConnect(), write_baseline(), write_plain_baselines(), and write_plain_configstrings().
◆ sv_clientlist
◆ sv_cmdlist_begin
◆ sv_cmdlist_connect
list_t sv_cmdlist_connect |
◆ sv_enforcetime
◆ sv_enhanced_setplayer
cvar_t* sv_enhanced_setplayer |
◆ sv_filterlist
◆ sv_force_reconnect
cvar_t* sv_force_reconnect |
◆ sv_ghostime
◆ sv_hostname
◆ sv_iplimit
◆ sv_lan_force_rate
cvar_t* sv_lan_force_rate |
◆ sv_masterlist
◆ sv_maxclients
Definition at line 58 of file main.c.
Referenced by AC_Info_f(), AC_ParseClient(), build_gamestate(), dummy_find_slot(), emit_frame(), find_client_slot(), MVD_GameInit(), PF_centerprintf(), PF_cprintf(), PF_Unicast(), player_is_active(), players_active(), SV_AutoSaveBegin(), SV_GetPlayer(), SV_Init(), SV_InitGame(), SV_InitGameProgs(), SV_Map(), SV_MvdInit(), SV_PickClient_f(), SV_Savegame_f(), SV_SpawnServer(), SV_StatusString(), SVC_DirectConnect(), and SVC_Info().
◆ sv_novis
◆ sv_outputbuf
◆ sv_password
◆ sv_pending_autosave
qboolean sv_pending_autosave |
◆ sv_player
Definition at line 33 of file main.c.
Referenced by AC_CheckTimeouts(), AC_ParseQueryReply(), dummy_command(), dummy_create(), dummy_run(), dummy_spawn(), SV_Begin_f(), SV_ClientThink(), SV_DumpUser_f(), SV_ExecuteClientMessage(), SV_ExecuteUserCommand(), SV_Kick_f(), SV_SetPlayer(), SV_Shutdown(), SV_Stuff_f(), SV_StuffCvar_f(), and SVC_DirectConnect().
◆ sv_pmp
◆ sv_qwmod
◆ sv_rcon_limit
◆ sv_recycle
◆ sv_reserved_slots
cvar_t* sv_reserved_slots |
◆ sv_status_limit
◆ sv_status_show
◆ sv_strafejump_hack
cvar_t* sv_strafejump_hack |
◆ sv_timeout
◆ sv_uptime
◆ sv_zombietime
◆ svs
Definition at line 21 of file init.c.
Referenced by AC_CheckTimeouts(), AC_ClientQuery(), AC_Info_f(), AC_Invalidate_f(), AC_List_f(), AC_ParseClient(), AC_ParseMessage(), AC_ParseReady(), AC_ParseViolation(), AC_SendPing(), AC_Update_f(), accept_client(), check_clients_activity(), check_entity(), check_players_activity(), check_reconnect(), check_timeouts(), compress_message(), drop_client(), dummy_create(), dummy_find_slot(), dummy_run(), dummy_spawn(), dump_clients(), dump_time(), filter_unicast_data(), find_client_slot(), get_last_frame(), gtv_drop(), init_rate_limits(), MVD_Connect_f(), mvd_enable(), MVD_GameClientBegin(), MVD_GameClientCommand(), MVD_GameClientConnect(), MVD_GameClientThink(), MVD_GameInit(), MVD_LayoutChannels(), MVD_LayoutClients(), MVD_LayoutFollow(), MVD_LayoutMenu(), MVD_LayoutScores(), MVD_ListServers_f(), MVD_NotifyClient(), MVD_PartFilter(), MVD_RemoveClient(), MVD_Say_f(), MVD_TrySwitchChannel(), MVD_UpdateClient(), MVD_UpdateLayouts(), parse_message(), parse_userinfo(), permit_connection(), PF_cprintf(), PF_Unicast(), player_is_active(), rec_start(), run_connect(), set_mvd_active(), sv_auth_limit_changed(), SV_BuildClientFrame(), SV_CalcSendTime(), SV_CheckTimeouts(), SV_ClientThink(), SV_ConnectionlessPacket(), SV_ConSay_f(), SV_DropClient(), SV_DumpUser_f(), SV_EmitPacketEntities(), SV_ExecuteUserCommand(), SV_Frame(), SV_GetPlayer(), SV_Heartbeat_f(), SV_InitGame(), SV_Kick_f(), SV_KillServer_f(), SV_ListMasters_f(), SV_MasterHeartbeat(), SV_MvdRunClients(), SV_New_f(), SV_PacketEvent(), SV_PickClient_f(), SV_Player_g(), SV_RateInit(), SV_RateLimited(), sv_rcon_limit_changed(), SV_Savegame_f(), SV_SendAsyncPackets(), SV_SetMaster_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), sv_status_limit_changed(), SV_Stuff_f(), SV_StuffAll_f(), SV_StuffCvar_f(), SVC_Ack(), SVC_DirectConnect(), SVC_GetChallenge(), SVC_RemoteCommand(), SVC_Status(), and write_stream().
static void SV_OldClientExecuteMove(void)
qboolean sv_pending_autosave
static qboolean moveIssued
void SV_Shutdown(const char *finalmsg, error_type_t type)
static void SV_ClipMoveToEntities(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passedict, int contentmask, trace_t *tr)
static qboolean PF_inPVS(vec3_t p1, vec3_t p2)
void SV_BuildClientFrame(client_t *client)
static client_frame_t * get_last_frame(client_t *client)
cvar_t * Cvar_Set(const char *var_name, const char *value)
void CM_BoxTrace(trace_t *trace, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, mnode_t *headnode, int brushmask)
void CM_FreeMap(cm_t *cm)
static void set_frame_time(void)
static int sv_numareanodes
size_t Com_TimeDiff(char *buffer, size_t size, time_t *p, time_t now)
void SV_LinkEdict(cm_t *cm, edict_t *ent)
void SV_BroadcastCommand(const char *fmt,...)
static void SV_ParseClientSetting(void)
char * NET_AdrToString(const netadr_t *a)
qboolean CM_HeadnodeVisible(mnode_t *node, byte *visbits)
#define SV_BASELINES_CHUNKS
void MVD_GameClientNameChanged(edict_t *ent, const char *name)
static const cmdreg_t c_server[]
static qboolean compress_message(client_t *client, int flags)
void SV_ShutdownClientSend(client_t *client)
static areanode_t * SV_CreateAreaNode(int depth, vec3_t mins, vec3_t maxs)
qerror_t CM_LoadMap(cm_t *cm, const char *name)
static void write_reliables_old(client_t *client, size_t maxsize)
static void PF_AddCommandString(const char *string)
void Cmd_AddCommand(const char *name, xcommand_t function)
entity_packed_t * entities
static edict_t ** area_list
void SV_CheckForSavegame(mapcmd_t *cmd)
static const cmdreg_t c_savegames[]
static int copy_save_dir(const char *src, const char *dst)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
const char * Q_ErrorString(qerror_t error)
byte * BSP_ClusterVis(bsp_t *bsp, byte *mask, int cluster, int vis)
void SV_SendClientMessages(void)
static void add_message_new(client_t *client, byte *data, size_t len, qboolean reliable)
static void PF_bprintf(int level, const char *fmt,...)
static cvar_t * PF_cvar(const char *name, const char *value, int flags)
cvar_t * sv_force_reconnect
static void SV_CalcSendTime(client_t *client, size_t size)
static int userinfoUpdateCount
void(* WriteDatagram)(struct client_s *)
static void * _SV_LoadGameLibrary(const char *path)
static void PF_PositionedSound(vec3_t origin, edict_t *entity, int channel, int soundindex, float volume, float attenuation, float timeofs)
static void override_entity_string(const char *server)
void PF_UnlinkEdict(edict_t *ent)
static int read_level_file(void)
#define SV_InfoSet(var, val)
int CM_BoxLeafs(cm_t *cm, vec3_t mins, vec3_t maxs, mleaf_t **list, int listsize, mnode_t **topnode)
static void SV_ConSay_f(void)
static void SV_NewClientExecuteMove(int c)
static int PF_ImageIndex(const char *name)
static void finish_frame(client_t *client)
void MSG_WriteByte(int c)
static unsigned rate2credits(unsigned rate)
cvar_t * sv_airaccelerate
unsigned Sys_Milliseconds(void)
static void SV_EmitPacketEntities(client_t *client, client_frame_t *from, client_frame_t *to, int clientEntityNum)
void SV_Multicast(vec3_t origin, multicast_t to)
static void PF_setmodel(edict_t *ent, const char *name)
void PF_LinkEdict(edict_t *ent)
static void print_drop_reason(client_t *client, const char *reason, clstate_t oldstate)
void CL_Disconnect(error_type_t type)
void SV_ClientAddMessage(client_t *client, int flags)
static void stuff_junk(void)
void SV_CleanClient(client_t *client)
#define SV_AlignKeyFrames(client)
void SV_MvdMapChanged(void)
#define FOR_EACH_CLIENT(client)
static int wipe_save_dir(const char *dir)
int SV_AreaEdicts(vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype)
cvar_t * sv_reserved_slots
qboolean CM_AreasConnected(cm_t *cm, int area1, int area2)
static void PF_SetAreaPortalState(int portalnum, qboolean open)
void MSG_WritePos(const vec3_t pos)
static mnode_t * SV_HullForEntity(edict_t *ent)
static void resolve_masters(void)
char * Cmd_ArgsFrom(int from)
void * SZ_GetSpace(sizebuf_t *buf, size_t len)
void Com_Error(error_type_t type, const char *fmt,...)
void MSG_PackEntity(entity_packed_t *out, const entity_state_t *in, qboolean short_angles)
#define HEARTBEAT_SECONDS
byte * CM_FatPVS(cm_t *cm, byte *mask, const vec3_t org, int vis)
void AC_ClientAnnounce(client_t *cl)
cvar_t * sv_lan_force_rate
static void write_plain_configstrings(void)
static q_noreturn void PF_error(const char *fmt,...)
int MSG_WriteDeltaPlayerstate_Enhanced(const player_packed_t *from, player_packed_t *to, msgPsFlags_t flags)
void SV_SendAsyncPackets(void)
void MSG_PackPlayer(player_packed_t *out, const player_state_t *in)
static size_t format_mask(addrmatch_t *match, char *buf, size_t buf_size)
entity_packed_t * baselines[SV_BASELINES_CHUNKS]
void PF_Pmove(pmove_t *pm)
void AC_Connect(unsigned mvd_spawn)
static void SV_ParseDeltaUserinfo(void)
client_frame_t frames[UPDATE_BACKUP]
void SV_MvdMulticast(int leafnum, multicast_t to)
int CM_WriteAreaBits(cm_t *cm, byte *buffer, int area)
char * Info_ValueForKey(const char *s, const char *key)
char * va(const char *format,...)
void Pmove(pmove_t *pmove, pmoveParams_t *params)
qboolean AC_ClientBegin(client_t *cl)
void Cmd_Register(const cmdreg_t *reg)
void PF_UnlinkEdict(edict_t *ent)
static int write_server_file(qboolean autosave)
void SV_ClientCommand(client_t *client, const char *fmt,...)
void SV_MvdClientDropped(client_t *client)
static int PF_ModelIndex(const char *name)
static void PF_centerprintf(edict_t *ent, const char *fmt,...)
void SV_CloseDownload(client_t *client)
int Cvar_VariableInteger(const char *var_name)
static void PF_DebugGraph(float value, int color)
void NET_Config(netflag_t flag)
void SV_AutoSaveEnd(void)
size_t Q_strlcpy(char *dst, const char *src, size_t size)
void SV_InitGameProgs(void)
static void write_pending_download(client_t *client)
void MSG_WriteShort(int c)
void Cvar_SetInteger(cvar_t *var, int value, from_t from)
void SV_DropClient(client_t *client, const char *reason)
cvar_t * Cvar_FullSet(const char *var_name, const char *value, int flags, from_t from)
cvar_t * Cvar_UserSet(const char *var_name, const char *value)
#define MAX_TOTAL_ENT_LEAFS
cvar_t * Cvar_WeakGet(const char *var_name)
int CM_PointContents(vec3_t p, mnode_t *headnode)
static void PF_dprintf(const char *fmt,...)
static void PF_WriteFloat(float f)
#define Q2PRO_OPTIMIZE(c)
qboolean COM_IsUint(const char *s)
static void SV_ParseClientCommand(void)
void MSG_WriteString(const char *string)
void SV_BroadcastPrintf(int level, const char *fmt,...)
#define SV_CLIENTSYNC(cl)
static qboolean parse_mask(char *s, netadr_t *addr, netadr_t *mask)
void MSG_WriteLong(int c)
static qboolean PF_inPHS(vec3_t p1, vec3_t p2)
cvar_t * sys_forcegamelib
qboolean NET_SendPacket(netsrc_t sock, const void *data, size_t len, const netadr_t *to)
static void SV_AreaEdicts_r(areanode_t *node)
static void write_plain_baselines(void)
#define Q2PRO_SHORTANGLES(c, e)
mleaf_t * CM_PointLeaf(cm_t *cm, vec3_t p)
int SV_PointContents(vec3_t p)
int Cvar_ClampInteger(cvar_t *var, int min, int max)
static int PF_SoundIndex(const char *name)
static void write_datagram_new(client_t *client)
void(* AddMessage)(struct client_s *, byte *, size_t, qboolean)
void Cvar_GetLatchedVars(void)
void SV_ShutdownGameProgs(void)
static void add_message_old(client_t *client, byte *data, size_t len, qboolean reliable)
static void PF_Unicast(edict_t *ent, qboolean reliable)
void MSG_WriteChar(int c)
list_t msg_unreliable_list
void SCR_BeginLoadingPlaque(void)
int SV_AreaEdicts(vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype)
static areanode_t sv_areanodes[AREA_NODES]
message_packet_t * msg_pool
static void * PF_TagMalloc(size_t size, unsigned tag)
void Netchan_Close(netchan_t *netchan)
size_t Q_concat(char *dest, size_t size,...)
cvar_t * sv_show_name_changes
void MVD_RemoveClient(client_t *client)
static void free_all_messages(client_t *client)
static void * SV_LoadGameLibrary(const char *game, const char *prefix)
void Sys_FreeLibrary(void *handle)
static void PF_cprintf(edict_t *ent, int level, const char *fmt,...)
struct areanode_s * children[2]
void AC_ClientDisconnect(client_t *cl)
server_entity_t entities[MAX_EDICTS]
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
byte areabits[MAX_MAP_AREA_BYTES]
static int write_level_file(void)
qboolean SV_EdictIsVisible(cm_t *cm, edict_t *ent, byte *mask)
trace_t q_gameabi SV_Trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passedict, int contentmask)
static void PF_StartSound(edict_t *edict, int channel, int soundindex, float volume, float attenuation, float timeofs)
static qboolean SV_RateDrop(client_t *client)
void MSG_WriteDir(const vec3_t dir)
char fs_gamedir[MAX_OSPATH]
void MSG_WriteAngle(float f)
list_t sv_cmdlist_connect
static void PF_configstring(int index, const char *val)
mnode_t * CM_NodeNum(cm_t *cm, int number)
int CM_TransformedPointContents(vec3_t p, mnode_t *headnode, vec3_t origin, vec3_t angles)
static int stringCmdCount
static void write_datagram_old(client_t *client)
static void stuff_cmds(list_t *list)
static void create_baselines(void)
void SZ_Clear(sizebuf_t *buf)
void SV_ClientReset(client_t *client)
static qboolean PF_AreasConnected(int area1, int area2)
static void * game_library
void MSG_WriteDeltaPlayerstate_Default(const player_packed_t *from, const player_packed_t *to)
static void PF_FreeTags(unsigned tag)
char name[MAX_CLIENT_NAME]
static void SV_ParseFullUserinfo(void)