2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 typedef struct server_static_s
27 /// number of svs.clients slots (updated by maxplayers command)
28 int maxclients, maxclients_next;
30 struct client_s *clients;
31 /// episode completion information
33 /// cleared when at SV_SpawnServer
34 qboolean changelevel_issued;
36 char serverinfo[MAX_SERVERINFO_STRING];
40 float perf_offset_avg;
41 float perf_offset_max;
42 float perf_offset_sdev;
43 // temporary performance data accumulators
44 float perf_acc_realtime;
45 float perf_acc_sleeptime;
47 float perf_acc_offset;
48 float perf_acc_offset_squared;
49 float perf_acc_offset_max;
50 int perf_acc_offset_samples;
53 unsigned char *csqc_progdata;
54 size_t csqc_progsize_deflated;
55 unsigned char *csqc_progdata_deflated;
57 // independent server thread (when running client)
58 qboolean threaded; // true if server is running on separate thread
59 qboolean volatile threadstop;
64 //=============================================================================
66 typedef enum server_state_e {ss_loading, ss_active} server_state_t;
68 #define MAX_CONNECTFLOODADDRESSES 16
69 #define MAX_GETSTATUSFLOODADDRESSES 128
70 typedef struct server_floodaddress_s
73 lhnetaddress_t address;
75 server_floodaddress_t;
77 typedef struct server_s
79 /// false if only a net client
84 /// handle connections specially
87 /// one of the PROTOCOL_ values
88 protocolversion_t protocol;
94 // used by PF_checkclient
98 // crc of clientside progs at time of level start
99 int csqc_progcrc; // -1 = no progs
100 int csqc_progsize; // -1 = no progs
101 char csqc_progname[MAX_QPATH]; // copied from csqc_progname at level start
103 /// collision culling data
107 char name[64]; // %s followed by entrance name
108 // variants of map name
109 char worldmessage[40]; // map title (not related to filename)
110 char worldbasename[MAX_QPATH]; // %s
111 char worldname[MAX_QPATH]; // maps/%s.bsp
112 char worldnamenoextension[MAX_QPATH]; // maps/%s
113 struct model_s *worldmodel;
115 // LadyHavoc: precaches are now MAX_QPATH rather than a pointer
116 // updated by SV_ModelIndex
117 char model_precache[MAX_MODELS][MAX_QPATH];
118 struct model_s *models[MAX_MODELS];
120 // LadyHavoc: precaches are now MAX_QPATH rather than a pointer
121 // updated by SV_SoundIndex
122 char sound_precache[MAX_SOUNDS][MAX_QPATH];
123 char lightstyles[MAX_LIGHTSTYLES][64];
124 /// some actions are only valid during load
125 server_state_t state;
128 unsigned char datagram_buf[NET_MAXMESSAGE];
130 // copied to all clients at end of frame
131 sizebuf_t reliable_datagram;
132 unsigned char reliable_datagram_buf[NET_MAXMESSAGE];
135 /// LadyHavoc: increased signon message buffer from 8192
136 unsigned char signon_buf[NET_MAXMESSAGE];
138 /// connection flood blocking
139 /// note this is in server_t rather than server_static_t so that it is
140 /// reset on each map command (such as New Game in singleplayer)
141 server_floodaddress_t connectfloodaddresses[MAX_CONNECTFLOODADDRESSES];
142 server_floodaddress_t getstatusfloodaddresses[MAX_GETSTATUSFLOODADDRESSES];
144 qboolean particleeffectnamesloaded;
145 char particleeffectname[MAX_PARTICLEEFFECTNAME][MAX_QPATH];
147 int writeentitiestoclient_stats_culled_pvs;
148 int writeentitiestoclient_stats_culled_trace;
149 int writeentitiestoclient_stats_visibleentities;
150 int writeentitiestoclient_stats_totalentities;
151 int writeentitiestoclient_cliententitynumber;
152 int writeentitiestoclient_clientnumber;
153 sizebuf_t *writeentitiestoclient_msg;
154 vec3_t writeentitiestoclient_eyes[MAX_CLIENTNETWORKEYES];
155 int writeentitiestoclient_numeyes;
156 int writeentitiestoclient_pvsbytes;
157 unsigned char writeentitiestoclient_pvs[MAX_MAP_LEAFS/8];
158 const entity_state_t *writeentitiestoclient_sendstates[MAX_EDICTS];
159 unsigned short writeentitiestoclient_csqcsendstates[MAX_EDICTS];
162 entity_state_t sendentities[MAX_EDICTS];
163 entity_state_t *sendentitiesindex[MAX_EDICTS];
165 int sententitiesmark;
166 int sententities[MAX_EDICTS];
167 int sententitiesconsideration[MAX_EDICTS];
169 /// legacy support for self.Version based csqc entity networking
170 unsigned char csqcentityversion[MAX_EDICTS]; // legacy
173 #define NUM_CSQCENTITIES_PER_FRAME 256
174 typedef struct csqcentityframedb_s
178 unsigned short entno[NUM_CSQCENTITIES_PER_FRAME];
179 int sendflags[NUM_CSQCENTITIES_PER_FRAME];
180 } csqcentityframedb_t;
182 // if defined this does ping smoothing, otherwise it does not
183 //#define NUM_PING_TIMES 16
185 #define NUM_SPAWN_PARMS 16
187 typedef struct client_s
189 /// false = empty client slot
191 /// false = don't do ClientDisconnect on drop
192 qboolean clientconnectcalled;
193 /// false = don't allow spawn
195 /// false = don't allow begin
197 /// false = don't send datagrams
199 /// 1 = send svc_serverinfo and advance to 2, 2 doesn't send, then advances to 0 (allowing unlimited sending) when prespawn is received
202 /// requested rate in bytes per second
205 /// temporarily exceed rate by this amount of bytes
208 /// realtime this client connected
211 /// keepalive messages must be sent periodically during signon
212 double keepalivetime;
214 /// communications handle
215 netconn_t *netconnection;
217 unsigned int movesequence;
218 signed char movement_count[NETGRAPH_PACKETS];
219 unsigned int movement_highestsequence_seen; // not the same as movesequence if prediction is off
222 /// intended motion calced from cmd
225 /// PRVM_EDICT_NUM(clientnum+1)
228 #ifdef NUM_PING_TIMES
229 float ping_times[NUM_PING_TIMES];
230 /// ping_times[num_pings%NUM_PING_TIMES]
233 /// LadyHavoc: can be used for prediction or whatever...
236 /// this is used by sv_clmovement_minping code
237 double clmovement_disabletimeout;
238 /// this is used by sv_clmovement_inputtimeout code
239 float clmovement_inputtimeout;
241 /// spawn parms are carried from level to level
242 prvm_vec_t spawn_parms[NUM_SPAWN_PARMS];
244 // properties that are sent across the network only when changed
245 char name[MAX_SCOREBOARDNAME], old_name[MAX_SCOREBOARDNAME];
246 int colors, old_colors;
247 int frags, old_frags;
248 char playermodel[MAX_QPATH], old_model[MAX_QPATH];
249 char playerskin[MAX_QPATH], old_skin[MAX_QPATH];
251 /// netaddress support
252 char netaddress[MAX_QPATH];
255 float visibletime[MAX_EDICTS];
257 // scope is whether an entity is currently being networked to this client
258 // sendflags is what properties have changed on the entity since the last
259 // update that was sent
261 unsigned char csqcentityscope[MAX_EDICTS];
262 unsigned int csqcentitysendflags[MAX_EDICTS];
264 #define NUM_CSQCENTITYDB_FRAMES 256
265 csqcentityframedb_t csqcentityframehistory[NUM_CSQCENTITYDB_FRAMES];
266 int csqcentityframehistory_next;
267 int csqcentityframe_lastreset;
269 /// prevent animated names
272 /// latest received clc_ackframe (used to detect packet loss)
275 /// cache weaponmodel name lookups
276 char weaponmodel[MAX_QPATH];
277 int weaponmodelindex;
279 /// clientcamera (entity to use as camera)
282 entityframe_database_t *entitydatabase;
283 entityframe4_database_t *entitydatabase4;
284 entityframe5_database_t *entitydatabase5;
286 // delta compression of stats
287 unsigned char statsdeltabits[(MAX_CL_STATS+7)/8];
288 int stats[MAX_CL_STATS];
290 unsigned char unreliablemsg_data[NET_MAXMESSAGE];
291 sizebuf_t unreliablemsg;
292 int unreliablemsg_splitpoints;
293 int unreliablemsg_splitpoint[NET_MAXMESSAGE/16];
295 // information on an active download if any
296 qfile_t *download_file;
297 int download_expectedposition; ///< next position the client should ack
298 qboolean download_started;
299 char download_name[MAX_QPATH];
300 qboolean download_deflate;
303 qboolean fixangle_angles_set;
304 vec3_t fixangle_angles;
307 qfile_t *sv_demo_file;
309 // number of skipped entity frames
310 // if it exceeds a limit, an empty entity frame is sent
311 int num_skippedentityframes;
313 // last sent move sequence
314 // if the move sequence changed, an empty entity frame is sent
315 unsigned int lastmovesequence;
319 //=============================================================================
321 // edict->movetype values
322 #define MOVETYPE_NONE 0 ///< never moves
323 #define MOVETYPE_ANGLENOCLIP 1
324 #define MOVETYPE_ANGLECLIP 2
325 #define MOVETYPE_WALK 3 ///< gravity
326 #define MOVETYPE_STEP 4 ///< gravity, special edge handling
327 #define MOVETYPE_FLY 5
328 #define MOVETYPE_TOSS 6 ///< gravity
329 #define MOVETYPE_PUSH 7 ///< no clip to world, push and crush
330 #define MOVETYPE_NOCLIP 8
331 #define MOVETYPE_FLYMISSILE 9 ///< extra size to monsters
332 #define MOVETYPE_BOUNCE 10
333 #define MOVETYPE_BOUNCEMISSILE 11 ///< bounce w/o gravity
334 #define MOVETYPE_FOLLOW 12 ///< track movement of aiment
335 #define MOVETYPE_FAKEPUSH 13 ///< tenebrae's push that doesn't push
336 #define MOVETYPE_PHYSICS 32 ///< indicates this object is physics controlled
337 #define MOVETYPE_FLY_WORLDONLY 33 ///< like MOVETYPE_FLY, but uses MOVE_WORLDONLY for all its traces; objects of this movetype better be SOLID_NOT or SOLID_TRIGGER please, or else...
338 #define MOVETYPE_USER_FIRST 128 ///< user defined movetypes
339 #define MOVETYPE_USER_LAST 191
341 // edict->solid values
342 #define SOLID_NOT 0 ///< no interaction with other objects
343 #define SOLID_TRIGGER 1 ///< touch on edge, but not blocking
344 #define SOLID_BBOX 2 ///< touch on edge, block
345 #define SOLID_SLIDEBOX 3 ///< touch on edge, but not an onground
346 #define SOLID_BSP 4 ///< bsp clip, touch on edge, block
347 // LadyHavoc: corpse code
348 #define SOLID_CORPSE 5 ///< same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
349 // LadyHavoc: physics
350 // VorteX: now these fields are deprecated, as geomtype is more flexible
351 #define SOLID_PHYSICS_BOX 32 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
352 #define SOLID_PHYSICS_SPHERE 33 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
353 #define SOLID_PHYSICS_CAPSULE 34 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
354 #define SOLID_PHYSICS_TRIMESH 35 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
355 #define SOLID_PHYSICS_CYLINDER 36 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity)
357 // edict->deadflag values
369 #define FL_CONVEYOR 4
371 #define FL_INWATER 16
372 #define FL_MONSTER 32
373 #define FL_GODMODE 64
374 #define FL_NOTARGET 128
376 #define FL_ONGROUND 512
377 #define FL_PARTIALGROUND 1024 ///< not all corners are valid
378 #define FL_WATERJUMP 2048 ///< player jumping out of water
379 #define FL_JUMPRELEASED 4096 ///< for jump debouncing
381 #define SPAWNFLAG_NOT_EASY 256
382 #define SPAWNFLAG_NOT_MEDIUM 512
383 #define SPAWNFLAG_NOT_HARD 1024
384 #define SPAWNFLAG_NOT_DEATHMATCH 2048
386 //============================================================================
389 extern cvar_t deathmatch;
390 extern cvar_t fraglimit;
391 extern cvar_t gamecfg;
392 extern cvar_t noexit;
393 extern cvar_t nomonsters;
394 extern cvar_t pausable;
395 extern cvar_t pr_checkextension;
396 extern cvar_t samelevel;
397 extern cvar_t saved1;
398 extern cvar_t saved2;
399 extern cvar_t saved3;
400 extern cvar_t saved4;
401 extern cvar_t savedgamecfg;
402 extern cvar_t scratch1;
403 extern cvar_t scratch2;
404 extern cvar_t scratch3;
405 extern cvar_t scratch4;
407 extern cvar_t host_timescale;
408 extern cvar_t sv_accelerate;
409 extern cvar_t sv_aim;
410 extern cvar_t sv_airaccel_qw;
411 extern cvar_t sv_airaccel_sideways_friction;
412 extern cvar_t sv_airaccelerate;
413 extern cvar_t sv_airstopaccelerate;
414 extern cvar_t sv_airstrafeaccelerate;
415 extern cvar_t sv_maxairstrafespeed;
416 extern cvar_t sv_airstrafeaccel_qw;
417 extern cvar_t sv_aircontrol;
418 extern cvar_t sv_aircontrol_power;
419 extern cvar_t sv_aircontrol_penalty;
420 extern cvar_t sv_airspeedlimit_nonqw;
421 extern cvar_t sv_allowdownloads;
422 extern cvar_t sv_allowdownloads_archive;
423 extern cvar_t sv_allowdownloads_config;
424 extern cvar_t sv_allowdownloads_dlcache;
425 extern cvar_t sv_allowdownloads_inarchive;
426 extern cvar_t sv_areagrid_mingridsize;
427 extern cvar_t sv_checkforpacketsduringsleep;
428 extern cvar_t sv_clmovement_enable;
429 extern cvar_t sv_clmovement_minping;
430 extern cvar_t sv_clmovement_minping_disabletime;
431 extern cvar_t sv_clmovement_inputtimeout;
432 extern cvar_t sv_clmovement_maxnetfps;
433 extern cvar_t sv_cullentities_nevercullbmodels;
434 extern cvar_t sv_cullentities_pvs;
435 extern cvar_t sv_cullentities_stats;
436 extern cvar_t sv_cullentities_trace;
437 extern cvar_t sv_cullentities_trace_delay;
438 extern cvar_t sv_cullentities_trace_enlarge;
439 extern cvar_t sv_cullentities_trace_prediction;
440 extern cvar_t sv_cullentities_trace_samples;
441 extern cvar_t sv_cullentities_trace_samples_extra;
442 extern cvar_t sv_debugmove;
443 extern cvar_t sv_echobprint;
444 extern cvar_t sv_edgefriction;
445 extern cvar_t sv_entpatch;
446 extern cvar_t sv_fixedframeratesingleplayer;
447 extern cvar_t sv_freezenonclients;
448 extern cvar_t sv_friction;
449 extern cvar_t sv_gameplayfix_blowupfallenzombies;
450 extern cvar_t sv_gameplayfix_consistentplayerprethink;
451 extern cvar_t sv_gameplayfix_delayprojectiles;
452 extern cvar_t sv_gameplayfix_droptofloorstartsolid;
453 extern cvar_t sv_gameplayfix_droptofloorstartsolid_nudgetocorrect;
454 extern cvar_t sv_gameplayfix_easierwaterjump;
455 extern cvar_t sv_gameplayfix_findradiusdistancetobox;
456 extern cvar_t sv_gameplayfix_gravityunaffectedbyticrate;
457 extern cvar_t sv_gameplayfix_grenadebouncedownslopes;
458 extern cvar_t sv_gameplayfix_multiplethinksperframe;
459 extern cvar_t sv_gameplayfix_noairborncorpse;
460 extern cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems;
461 extern cvar_t sv_gameplayfix_nudgeoutofsolid;
462 extern cvar_t sv_gameplayfix_nudgeoutofsolid_separation;
463 extern cvar_t sv_gameplayfix_q2airaccelerate;
464 extern cvar_t sv_gameplayfix_nogravityonground;
465 extern cvar_t sv_gameplayfix_setmodelrealbox;
466 extern cvar_t sv_gameplayfix_slidemoveprojectiles;
467 extern cvar_t sv_gameplayfix_stepdown;
468 extern cvar_t sv_gameplayfix_stepmultipletimes;
469 extern cvar_t sv_gameplayfix_nostepmoveonsteepslopes;
470 extern cvar_t sv_gameplayfix_swiminbmodels;
471 extern cvar_t sv_gameplayfix_upwardvelocityclearsongroundflag;
472 extern cvar_t sv_gameplayfix_downtracesupportsongroundflag;
473 extern cvar_t sv_gameplayfix_q1bsptracelinereportstexture;
474 extern cvar_t sv_gameplayfix_unstickplayers;
475 extern cvar_t sv_gameplayfix_unstickentities;
476 extern cvar_t sv_gameplayfix_fixedcheckwatertransition;
477 extern cvar_t sv_gravity;
478 extern cvar_t sv_idealpitchscale;
479 extern cvar_t sv_jumpstep;
480 extern cvar_t sv_jumpvelocity;
481 extern cvar_t sv_maxairspeed;
482 extern cvar_t sv_maxrate;
483 extern cvar_t sv_maxspeed;
484 extern cvar_t sv_maxvelocity;
485 extern cvar_t sv_nostep;
486 extern cvar_t sv_playerphysicsqc;
487 extern cvar_t sv_progs;
488 extern cvar_t sv_protocolname;
489 extern cvar_t sv_random_seed;
490 extern cvar_t sv_ratelimitlocalplayer;
491 extern cvar_t sv_sound_land;
492 extern cvar_t sv_sound_watersplash;
493 extern cvar_t sv_stepheight;
494 extern cvar_t sv_stopspeed;
495 extern cvar_t sv_wallfriction;
496 extern cvar_t sv_wateraccelerate;
497 extern cvar_t sv_waterfriction;
498 extern cvar_t sv_areadebug;
499 extern cvar_t sys_ticrate;
500 extern cvar_t teamplay;
502 extern cvar_t timelimit;
504 extern mempool_t *sv_mempool;
506 /// persistant server info
507 extern server_static_t svs;
511 extern client_t *host_client;
513 //===========================================================
515 void SV_Init_Commands(void);
518 void SV_StartParticle (vec3_t org, vec3_t dir, int color, int count);
519 void SV_StartEffect (vec3_t org, int modelindex, int startframe, int framecount, int framerate);
520 void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int volume, float attenuation, qboolean reliable, float speed);
521 void SV_StartPointSound (vec3_t origin, const char *sample, int volume, float attenuation, float speed);
523 void SV_ConnectClient (int clientnum, netconn_t *netconnection);
524 void SV_DropClient (qboolean crash);
526 void SV_SendClientMessages(void);
528 void SV_ReadClientMessage(void);
530 // precachemode values:
531 // 0 = fail if not precached,
532 // 1 = warn if not found and precache if possible
534 int SV_ModelIndex(const char *s, int precachemode);
535 int SV_SoundIndex(const char *s, int precachemode);
537 int SV_ParticleEffectIndex(const char *name);
539 dp_model_t *SV_GetModelByIndex(int modelindex);
540 dp_model_t *SV_GetModelFromEdict(prvm_edict_t *ed);
542 void SV_SetIdealPitch (void);
544 void SV_AddUpdates (void);
546 void SV_ClientThink (void);
548 void SV_ClientPrint(const char *msg);
549 void SV_ClientPrintf(const char *fmt, ...) DP_FUNC_PRINTF(1);
550 void SV_BroadcastPrint(const char *msg);
551 void SV_BroadcastPrintf(const char *fmt, ...) DP_FUNC_PRINTF(1);
553 void SV_Physics (void);
554 void SV_Physics_ClientMove (void);
555 //void SV_Physics_ClientEntity (prvm_edict_t *ent);
557 qboolean SV_PlayerCheckGround (prvm_edict_t *ent);
558 qboolean SV_CheckBottom (prvm_edict_t *ent);
559 qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean noenemy, qboolean settrace);
561 /*! Needs to be called any time an entity changes origin, mins, maxs, or solid
562 * sets ent->v.absmin and ent->v.absmax
563 * call TouchAreaGrid as well to fire triggers that overlap the box
565 void SV_LinkEdict(prvm_edict_t *ent);
566 void SV_LinkEdict_TouchAreaGrid(prvm_edict_t *ent);
567 void SV_LinkEdict_TouchAreaGrid_Call(prvm_edict_t *touch, prvm_edict_t *ent); // if we detected a touch from another source
569 /*! move an entity that is stuck by small amounts in various directions to try to nudge it back into the collision hull
570 * returns true if it found a better place
572 qboolean SV_UnstickEntity (prvm_edict_t *ent);
573 /*! move an entity that is stuck out of the surface it is stuck in (can move large amounts)
574 * returns true if it found a better place
576 qboolean SV_NudgeOutOfSolid(prvm_edict_t *ent);
578 /// calculates hitsupercontentsmask for a generic qc entity
579 int SV_GenericHitSuperContentsMask(const prvm_edict_t *edict);
580 /// traces a box move against worldmodel and all entities in the specified area
581 trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend);
582 trace_t SV_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend);
583 trace_t SV_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask);
584 int SV_EntitiesInBox(const vec3_t mins, const vec3_t maxs, int maxedicts, prvm_edict_t **resultedicts);
586 qboolean SV_CanSeeBox(int numsamples, vec_t eyejitter, vec_t enlarge, vec_t entboxexpand, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs);
588 int SV_PointSuperContents(const vec3_t point);
590 void SV_FlushBroadcastMessages(void);
591 void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t *msg, int *stats);
593 void VM_SV_MoveToGoal(prvm_prog_t *prog);
595 void SV_ApplyClientMove (void);
596 void SV_SaveSpawnparms (void);
597 void SV_SpawnServer (const char *server);
599 void SV_CheckVelocity (prvm_edict_t *ent);
601 void SV_SetupVM(void);
603 const char *Host_TimingReport(char *buf, size_t buflen); ///< for output in Host_Status_f
605 int SV_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent);
606 void SV_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix);
608 void SV_StartThread(void);
609 void SV_StopThread(void);
610 #define SV_LockThreadMutex() (void)(svs.threaded ? Thread_LockMutex(svs.threadmutex) : 0)
611 #define SV_UnlockThreadMutex() (void)(svs.threaded ? Thread_UnlockMutex(svs.threadmutex) : 0)
613 void VM_CustomStats_Clear(void);
614 void VM_SV_UpdateCustomStats(client_t *client, prvm_edict_t *ent, sizebuf_t *msg, int *stats);
615 void Host_Savegame_to(prvm_prog_t *prog, const char *name);
616 void SV_SendServerinfo(client_t *client);