vkQuake2 doxygen  1.0 dev
qcommon.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
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.
8 
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.
12 
13 See the GNU General Public License for more details.
14 
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.
18 
19 */
20 
21 // qcommon.h -- definitions common between client and server, but not game.dll
22 
23 #include "../game/q_shared.h"
24 
25 
26 #define VERSION 3.21
27 
28 #define BASEDIRNAME "baseq2"
29 
30 #ifdef WIN32
31 
32 #ifdef NDEBUG
33 #define BUILDSTRING "Win32"
34 #else
35 #define BUILDSTRING "Win32 DEBUG"
36 #endif
37 
38 #ifdef _M_IX86
39 #define CPUSTRING "x86"
40 #elif defined _M_X64
41 #define CPUSTRING "x64"
42 #elif defined _M_ALPHA
43 #define CPUSTRING "AXP"
44 #endif
45 
46 #elif defined __linux__
47 
48 #ifdef NDEBUG
49 #define BUILDSTRING "Linux"
50 #else
51 #define BUILDSTRING "Linux DEBUG"
52 #endif
53 
54 #ifdef __i386__
55 #define CPUSTRING "i386"
56 #elif defined __LP64__
57 #define CPUSTRING "x64"
58 #elif defined __alpha__
59 #define CPUSTRING "axp"
60 #else
61 #define CPUSTRING "Unknown"
62 #endif
63 
64 #elif defined __APPLE__
65 
66 #ifdef NDEBUG
67 #define BUILDSTRING "MacOS"
68 #else
69 #define BUILDSTRING "MacOS DEBUG"
70 #endif
71 #define CPUSTRING "x64"
72 
73 #elif defined __sun__
74 
75 #define BUILDSTRING "Solaris"
76 
77 #ifdef __i386__
78 #define CPUSTRING "i386"
79 #else
80 #define CPUSTRING "sparc"
81 #endif
82 
83 #else // !WIN32
84 
85 #define BUILDSTRING "NON-WIN32"
86 #define CPUSTRING "NON-WIN32"
87 
88 #endif
89 
90 //============================================================================
91 
92 typedef struct sizebuf_s
93 {
94  qboolean allowoverflow; // if false, do a Com_Error
95  qboolean overflowed; // set to true if the buffer size failed
96  byte *data;
97  int maxsize;
98  int cursize;
99  int readcount;
100 } sizebuf_t;
101 
102 void SZ_Init (sizebuf_t *buf, byte *data, int length);
103 void SZ_Clear (sizebuf_t *buf);
104 void *SZ_GetSpace (sizebuf_t *buf, int length);
105 void SZ_Write (sizebuf_t *buf, void *data, int length);
106 void SZ_Print (sizebuf_t *buf, char *data); // strcats onto the sizebuf
107 
108 //============================================================================
109 
110 struct usercmd_s;
111 struct entity_state_s;
112 
113 void MSG_WriteChar (sizebuf_t *sb, int c);
114 void MSG_WriteByte (sizebuf_t *sb, int c);
115 void MSG_WriteShort (sizebuf_t *sb, int c);
116 void MSG_WriteLong (sizebuf_t *sb, int c);
117 void MSG_WriteFloat (sizebuf_t *sb, float f);
118 void MSG_WriteString (sizebuf_t *sb, char *s);
119 void MSG_WriteCoord (sizebuf_t *sb, float f);
120 void MSG_WritePos (sizebuf_t *sb, vec3_t pos);
121 void MSG_WriteAngle (sizebuf_t *sb, float f);
122 void MSG_WriteAngle16 (sizebuf_t *sb, float f);
123 void MSG_WriteDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd);
124 void MSG_WriteDeltaEntity (struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity);
125 void MSG_WriteDir (sizebuf_t *sb, vec3_t vector);
126 
127 
128 void MSG_BeginReading (sizebuf_t *sb);
129 
130 int MSG_ReadChar (sizebuf_t *sb);
131 int MSG_ReadByte (sizebuf_t *sb);
132 int MSG_ReadShort (sizebuf_t *sb);
133 int MSG_ReadLong (sizebuf_t *sb);
134 float MSG_ReadFloat (sizebuf_t *sb);
135 char *MSG_ReadString (sizebuf_t *sb);
136 char *MSG_ReadStringLine (sizebuf_t *sb);
137 
138 float MSG_ReadCoord (sizebuf_t *sb);
139 void MSG_ReadPos (sizebuf_t *sb, vec3_t pos);
140 float MSG_ReadAngle (sizebuf_t *sb);
141 float MSG_ReadAngle16 (sizebuf_t *sb);
142 void MSG_ReadDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd);
143 
144 void MSG_ReadDir (sizebuf_t *sb, vec3_t vector);
145 
146 void MSG_ReadData (sizebuf_t *sb, void *buffer, int size);
147 
148 //============================================================================
149 
150 extern qboolean bigendien;
151 
152 extern short BigShort (short l);
153 extern short LittleShort (short l);
154 extern int BigLong (int l);
155 extern int LittleLong (int l);
156 extern float BigFloat (float l);
157 extern float LittleFloat (float l);
158 
159 //============================================================================
160 
161 
162 int COM_Argc (void);
163 char *COM_Argv (int arg); // range and null checked
164 void COM_ClearArgv (int arg);
165 int COM_CheckParm (char *parm);
166 void COM_AddParm (char *parm);
167 
168 void COM_Init (void);
169 void COM_InitArgv (int argc, char **argv);
170 
171 char *CopyString (char *in);
172 
173 //============================================================================
174 
175 void Info_Print (char *s);
176 
177 
178 /* crc.h */
179 
180 void CRC_Init(unsigned short *crcvalue);
181 void CRC_ProcessByte(unsigned short *crcvalue, byte data);
182 unsigned short CRC_Value(unsigned short crcvalue);
183 unsigned short CRC_Block (byte *start, int count);
184 
185 
186 
187 /*
188 ==============================================================
189 
190 PROTOCOL
191 
192 ==============================================================
193 */
194 
195 // protocol.h -- communications protocols
196 
197 #define PROTOCOL_VERSION 34
198 
199 //=========================================
200 
201 #define PORT_MASTER 27900
202 #define PORT_CLIENT 27901
203 #define PORT_SERVER 27910
204 
205 //=========================================
206 
207 #define UPDATE_BACKUP 16 // copies of entity_state_t to keep buffered
208  // must be power of two
209 #define UPDATE_MASK (UPDATE_BACKUP-1)
210 
211 
212 
213 //==================
214 // the svc_strings[] array in cl_parse.c should mirror this
215 //==================
216 
217 //
218 // server to client
219 //
221 {
223 
224  // these ops are known to the game dll
230 
231  // the rest are private to the client and server
235  svc_sound, // <see code>
236  svc_print, // [byte] id [string] null terminated string
237  svc_stufftext, // [string] stuffed into client's console buffer, should be \n terminated
238  svc_serverdata, // [long] protocol ...
239  svc_configstring, // [short] [string]
241  svc_centerprint, // [string] to put in center of the screen
242  svc_download, // [short] size [size bytes]
243  svc_playerinfo, // variable
247 };
248 
249 //==============================================
250 
251 //
252 // client to server
253 //
255 {
258  clc_move, // [[usercmd_t]
259  clc_userinfo, // [[userinfo string]
260  clc_stringcmd // [string] message
261 };
262 
263 //==============================================
264 
265 // plyer_state_t communication
266 
267 #define PS_M_TYPE (1<<0)
268 #define PS_M_ORIGIN (1<<1)
269 #define PS_M_VELOCITY (1<<2)
270 #define PS_M_TIME (1<<3)
271 #define PS_M_FLAGS (1<<4)
272 #define PS_M_GRAVITY (1<<5)
273 #define PS_M_DELTA_ANGLES (1<<6)
274 
275 #define PS_VIEWOFFSET (1<<7)
276 #define PS_VIEWANGLES (1<<8)
277 #define PS_KICKANGLES (1<<9)
278 #define PS_BLEND (1<<10)
279 #define PS_FOV (1<<11)
280 #define PS_WEAPONINDEX (1<<12)
281 #define PS_WEAPONFRAME (1<<13)
282 #define PS_RDFLAGS (1<<14)
283 
284 //==============================================
285 
286 // user_cmd_t communication
287 
288 // ms and light always sent, the others are optional
289 #define CM_ANGLE1 (1<<0)
290 #define CM_ANGLE2 (1<<1)
291 #define CM_ANGLE3 (1<<2)
292 #define CM_FORWARD (1<<3)
293 #define CM_SIDE (1<<4)
294 #define CM_UP (1<<5)
295 #define CM_BUTTONS (1<<6)
296 #define CM_IMPULSE (1<<7)
297 
298 //==============================================
299 
300 // a sound without an ent or pos will be a local only sound
301 #define SND_VOLUME (1<<0) // a byte
302 #define SND_ATTENUATION (1<<1) // a byte
303 #define SND_POS (1<<2) // three coordinates
304 #define SND_ENT (1<<3) // a short 0-2: channel, 3-12: entity
305 #define SND_OFFSET (1<<4) // a byte, msec offset from frame start
306 
307 #define DEFAULT_SOUND_PACKET_VOLUME 1.0
308 #define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
309 
310 //==============================================
311 
312 // entity_state_t communication
313 
314 // try to pack the common update flags into the first byte
315 #define U_ORIGIN1 (1<<0)
316 #define U_ORIGIN2 (1<<1)
317 #define U_ANGLE2 (1<<2)
318 #define U_ANGLE3 (1<<3)
319 #define U_FRAME8 (1<<4) // frame is a byte
320 #define U_EVENT (1<<5)
321 #define U_REMOVE (1<<6) // REMOVE this entity, don't add it
322 #define U_MOREBITS1 (1<<7) // read one additional byte
323 
324 // second byte
325 #define U_NUMBER16 (1<<8) // NUMBER8 is implicit if not set
326 #define U_ORIGIN3 (1<<9)
327 #define U_ANGLE1 (1<<10)
328 #define U_MODEL (1<<11)
329 #define U_RENDERFX8 (1<<12) // fullbright, etc
330 #define U_EFFECTS8 (1<<14) // autorotate, trails, etc
331 #define U_MOREBITS2 (1<<15) // read one additional byte
332 
333 // third byte
334 #define U_SKIN8 (1<<16)
335 #define U_FRAME16 (1<<17) // frame is a short
336 #define U_RENDERFX16 (1<<18) // 8 + 16 = 32
337 #define U_EFFECTS16 (1<<19) // 8 + 16 = 32
338 #define U_MODEL2 (1<<20) // weapons, flags, etc
339 #define U_MODEL3 (1<<21)
340 #define U_MODEL4 (1<<22)
341 #define U_MOREBITS3 (1<<23) // read one additional byte
342 
343 // fourth byte
344 #define U_OLDORIGIN (1<<24) // FIXME: get rid of this
345 #define U_SKIN16 (1<<25)
346 #define U_SOUND (1<<26)
347 #define U_SOLID (1<<27)
348 
349 
350 /*
351 ==============================================================
352 
353 CMD
354 
355 Command text buffering and command execution
356 
357 ==============================================================
358 */
359 
360 /*
361 
362 Any number of commands can be added in a frame, from several different sources.
363 Most commands come from either keybindings or console line input, but remote
364 servers can also send across commands and entire text files can be execed.
365 
366 The + command line options are also added to the command buffer.
367 
368 The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute ();
369 
370 */
371 
372 #define EXEC_NOW 0 // don't return until completed
373 #define EXEC_INSERT 1 // insert at current position, but don't run yet
374 #define EXEC_APPEND 2 // add to end of the command buffer
375 
376 void Cbuf_Init (void);
377 // allocates an initial text buffer that will grow as needed
378 
379 void Cbuf_AddText (char *text);
380 // as new commands are generated from the console or keybindings,
381 // the text is added to the end of the command buffer.
382 
383 void Cbuf_InsertText (char *text);
384 // when a command wants to issue other commands immediately, the text is
385 // inserted at the beginning of the buffer, before any remaining unexecuted
386 // commands.
387 
388 void Cbuf_ExecuteText (int exec_when, char *text);
389 // this can be used in place of either Cbuf_AddText or Cbuf_InsertText
390 
391 void Cbuf_AddEarlyCommands (qboolean clear);
392 // adds all the +set commands from the command line
393 
395 // adds all the remaining + commands from the command line
396 // Returns true if any late commands were added, which
397 // will keep the demoloop from immediately starting
398 
399 void Cbuf_Execute (void);
400 // Pulls off \n terminated lines of text from the command buffer and sends
401 // them through Cmd_ExecuteString. Stops when the buffer is empty.
402 // Normally called once per frame, but may be explicitly invoked.
403 // Do not call inside a command function!
404 
405 void Cbuf_CopyToDefer (void);
406 void Cbuf_InsertFromDefer (void);
407 // These two functions are used to defer any pending commands while a map
408 // is being loaded
409 
410 //===========================================================================
411 
412 /*
413 
414 Command execution takes a null terminated string, breaks it into tokens,
415 then searches for a command or variable that matches the first token.
416 
417 */
418 
419 typedef void (*xcommand_t) (void);
420 
421 void Cmd_Init (void);
422 
423 void Cmd_AddCommand (char *cmd_name, xcommand_t function);
424 // called by the init functions of other parts of the program to
425 // register commands and functions to call for them.
426 // The cmd_name is referenced later, so it should not be in temp memory
427 // if function is NULL, the command will be forwarded to the server
428 // as a clc_stringcmd instead of executed locally
429 void Cmd_RemoveCommand (char *cmd_name);
430 
431 qboolean Cmd_Exists (char *cmd_name);
432 // used by the cvar code to check for cvar / command name overlap
433 
434 char *Cmd_CompleteCommand (char *partial);
435 // attempts to match a partial command for automatic command line completion
436 // returns NULL if nothing fits
437 
438 int Cmd_Argc (void);
439 char *Cmd_Argv (int arg);
440 char *Cmd_Args (void);
441 // The functions that execute commands get their parameters with these
442 // functions. Cmd_Argv () will return an empty string, not a NULL
443 // if arg > argc, so string operations are always safe.
444 
445 void Cmd_TokenizeString (char *text, qboolean macroExpand);
446 // Takes a null terminated string. Does not need to be /n terminated.
447 // breaks the string up into arg tokens.
448 
449 void Cmd_ExecuteString (char *text);
450 // Parses a single line of text into arguments and tries to execute it
451 // as if it was typed at the console
452 
453 void Cmd_ForwardToServer (void);
454 // adds the current command line as a clc_stringcmd to the client message.
455 // things like godmode, noclip, etc, are commands directed to the server,
456 // so when they are typed in at the console, they will need to be forwarded.
457 
458 
459 /*
460 ==============================================================
461 
462 CVAR
463 
464 ==============================================================
465 */
466 
467 /*
468 
469 cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly
470 in C code.
471 
472 The user can access cvars from the console in three ways:
473 r_draworder prints the current value
474 r_draworder 0 sets the current value to 0
475 set r_draworder 0 as above, but creates the cvar if not present
476 Cvars are restricted from having the same names as commands to keep this
477 interface from being ambiguous.
478 */
479 
480 extern cvar_t *cvar_vars;
481 
482 cvar_t *Cvar_Get (char *var_name, char *value, int flags);
483 // creates the variable if it doesn't exist, or returns the existing one
484 // if it exists, the value will not be changed, but flags will be ORed in
485 // that allows variables to be unarchived without needing bitflags
486 
487 cvar_t *Cvar_Set (char *var_name, char *value);
488 // will create the variable if it doesn't exist
489 
490 cvar_t *Cvar_ForceSet (char *var_name, char *value);
491 // will set the variable even if NOSET or LATCH
492 
493 cvar_t *Cvar_FullSet (char *var_name, char *value, int flags);
494 
495 void Cvar_SetValue (char *var_name, float value);
496 // expands value to a string and calls Cvar_Set
497 
498 float Cvar_VariableValue (char *var_name);
499 // returns 0 if not defined or non numeric
500 
501 char *Cvar_VariableString (char *var_name);
502 // returns an empty string if not defined
503 
504 char *Cvar_CompleteVariable (char *partial);
505 // attempts to match a partial variable name for command line completion
506 // returns NULL if nothing fits
507 
508 void Cvar_GetLatchedVars (void);
509 // any CVAR_LATCHED variables that have been set will now take effect
510 
511 qboolean Cvar_Command (void);
512 // called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known
513 // command. Returns true if the command was a variable reference that
514 // was handled. (print or change)
515 
516 void Cvar_WriteVariables (char *path);
517 // appends lines containing "set variable value" for all variables
518 // with the archive flag set to true.
519 
520 void Cvar_Init (void);
521 
522 char *Cvar_Userinfo (void);
523 // returns an info string containing all the CVAR_USERINFO cvars
524 
525 char *Cvar_Serverinfo (void);
526 // returns an info string containing all the CVAR_SERVERINFO cvars
527 
529 // this is set each time a CVAR_USERINFO variable is changed
530 // so that the client knows to send it to the server
531 
532 /*
533 ==============================================================
534 
535 NET
536 
537 ==============================================================
538 */
539 
540 // net.h -- quake's interface to the networking layer
541 
542 #define PORT_ANY -1
543 
544 #define MAX_MSGLEN 1400 // max length of a message
545 #define PACKET_HEADER 10 // two ints and a short
546 
548 
549 typedef enum {NS_CLIENT, NS_SERVER} netsrc_t;
550 
551 typedef struct
552 {
554 
555  byte ip[4];
556  byte ipx[10];
557 
558  unsigned short port;
559 } netadr_t;
560 
561 void NET_Init (void);
562 void NET_Shutdown (void);
563 
564 void NET_Config (qboolean multiplayer);
565 
567 void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to);
568 
572 char *NET_AdrToString (netadr_t a);
573 qboolean NET_StringToAdr (char *s, netadr_t *a);
574 void NET_Sleep(int msec);
575 
576 //============================================================================
577 
578 #define OLD_AVG 0.99 // total = oldtotal*OLD_AVG + new*(1-OLD_AVG)
579 
580 #define MAX_LATENT 32
581 
582 typedef struct
583 {
585 
587 
588  int dropped; // between last packet and previous
589 
590  int last_received; // for timeouts
591  int last_sent; // for retransmits
592 
594  int qport; // qport value to write when transmitting
595 
596 // sequencing variables
600 
601  int incoming_reliable_sequence; // single bit, maintained local
602 
604  int reliable_sequence; // single bit
605  int last_reliable_sequence; // sequence number of last send
606 
607 // reliable staging and holding areas
608  sizebuf_t message; // writing buffer to send to server
609  byte message_buf[MAX_MSGLEN-16]; // leave space for header
610 
611 // message is copied to this buffer when it is first transfered
613  byte reliable_buf[MAX_MSGLEN-16]; // unacked reliable message
614 } netchan_t;
615 
616 extern netadr_t net_from;
617 extern sizebuf_t net_message;
618 extern byte net_message_buffer[MAX_MSGLEN];
619 
620 
621 void Netchan_Init (void);
622 void Netchan_Setup (netsrc_t sock, netchan_t *chan, netadr_t adr, int qport);
623 
625 void Netchan_Transmit (netchan_t *chan, int length, byte *data);
626 void Netchan_OutOfBand (int net_socket, netadr_t adr, int length, byte *data);
627 void Netchan_OutOfBandPrint (int net_socket, netadr_t adr, char *format, ...);
629 
631 
632 
633 /*
634 ==============================================================
635 
636 CMODEL
637 
638 ==============================================================
639 */
640 
641 
642 #include "../qcommon/qfiles.h"
643 
644 cmodel_t *CM_LoadMap (char *name, qboolean clientload, unsigned *checksum);
645 cmodel_t *CM_InlineModel (char *name); // *1, *2, etc
646 
647 int CM_NumClusters (void);
648 int CM_NumInlineModels (void);
649 char *CM_EntityString (void);
650 
651 // creates a clipping hull for an arbitrary box
652 int CM_HeadnodeForBox (vec3_t mins, vec3_t maxs);
653 
654 
655 // returns an ORed contents mask
656 int CM_PointContents (vec3_t p, int headnode);
658 
659 trace_t CM_BoxTrace (vec3_t start, vec3_t end,
660  vec3_t mins, vec3_t maxs,
661  int headnode, int brushmask);
663  vec3_t mins, vec3_t maxs,
664  int headnode, int brushmask,
666 
667 byte *CM_ClusterPVS (int cluster);
668 byte *CM_ClusterPHS (int cluster);
669 
670 int CM_PointLeafnum (vec3_t p);
671 
672 // call with topnode set to the headnode, returns with topnode
673 // set to the first node that splits the box
674 int CM_BoxLeafnums (vec3_t mins, vec3_t maxs, int *list,
675  int listsize, int *topnode);
676 
677 int CM_LeafContents (int leafnum);
678 int CM_LeafCluster (int leafnum);
679 int CM_LeafArea (int leafnum);
680 
681 void CM_SetAreaPortalState (int portalnum, qboolean open);
682 qboolean CM_AreasConnected (int area1, int area2);
683 
684 int CM_WriteAreaBits (byte *buffer, int area);
685 qboolean CM_HeadnodeVisible (int headnode, byte *visbits);
686 
687 void CM_WritePortalState (FILE *f);
688 void CM_ReadPortalState (FILE *f);
689 
690 /*
691 ==============================================================
692 
693 PLAYER MOVEMENT CODE
694 
695 Common between server and client so prediction matches
696 
697 ==============================================================
698 */
699 
700 extern float pm_airaccelerate;
701 
702 void Pmove (pmove_t *pmove);
703 
704 /*
705 ==============================================================
706 
707 FILESYSTEM
708 
709 ==============================================================
710 */
711 
712 void FS_InitFilesystem (void);
713 void FS_SetGamedir (char *dir);
714 char *FS_Gamedir (void);
715 char *FS_NextPath (char *prevpath);
716 void FS_ExecAutoexec (void);
717 
718 int FS_FOpenFile (char *filename, FILE **file);
719 void FS_FCloseFile (FILE *f);
720 // note: this can't be called from another DLL, due to MS libc issues
721 
722 int FS_LoadFile (char *path, void **buffer);
723 // a null buffer will just return the file length without loading
724 // a -1 length is not present
725 
726 void FS_Read (void *buffer, int len, FILE *f);
727 // properly handles partial reads
728 
729 void FS_FreeFile (void *buffer);
730 
731 void FS_CreatePath (char *path);
732 
733 
734 /*
735 ==============================================================
736 
737 MISC
738 
739 ==============================================================
740 */
741 
742 
743 #define ERR_FATAL 0 // exit the entire game with a popup window
744 #define ERR_DROP 1 // print to console and disconnect from game
745 #define ERR_QUIT 2 // not an error, just a normal exit
746 
747 #define EXEC_NOW 0 // don't return until completed
748 #define EXEC_INSERT 1 // insert at current position, but don't run yet
749 #define EXEC_APPEND 2 // add to end of the command buffer
750 
751 #define PRINT_ALL 0
752 #define PRINT_DEVELOPER 1 // only print when "developer 1"
753 
754 void Com_BeginRedirect (int target, char *buffer, int buffersize, void (*flush));
755 void Com_EndRedirect (void);
756 void Com_Printf (char *fmt, ...);
757 void Com_DPrintf (char *fmt, ...);
758 void Com_Error (int code, char *fmt, ...);
759 void Com_Quit (void);
760 
761 int Com_ServerState (void); // this should have just been a cvar...
762 void Com_SetServerState (int state);
763 
764 unsigned Com_BlockChecksum (void *buffer, int length);
765 byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence);
766 
767 float frand(void); // 0 ti 1
768 float crand(void); // -1 to 1
769 
770 extern cvar_t *developer;
771 extern cvar_t *dedicated;
772 extern cvar_t *host_speeds;
773 extern cvar_t *log_stats;
774 
775 extern FILE *log_stats_file;
776 
777 // host_speeds times
778 extern int time_before_game;
779 extern int time_after_game;
780 extern int time_before_ref;
781 extern int time_after_ref;
782 
783 void Z_Free (void *ptr);
784 void *Z_Malloc (int size); // returns 0 filled memory
785 void *Z_TagMalloc (int size, int tag);
786 void Z_FreeTags (int tag);
787 
788 void Qcommon_Init (int argc, char **argv);
789 void Qcommon_Frame (int msec);
790 void Qcommon_Shutdown (void);
791 
792 #define NUMVERTEXNORMALS 162
794 
795 // this is in the client code, but can be used for debugging from server
796 void SCR_DebugGraph (float value, int color);
797 
798 
799 /*
800 ==============================================================
801 
802 NON-PORTABLE SYSTEM SERVICES
803 
804 ==============================================================
805 */
806 
807 void Sys_Init (void);
808 
809 void Sys_AppActivate (void);
810 
811 void Sys_UnloadGame (void);
812 void *Sys_GetGameAPI (void *parms);
813 // loads the game dll and calls the api init function
814 
815 char *Sys_ConsoleInput (void);
816 void Sys_ConsoleOutput (char *string);
817 void Sys_SendKeyEvents (void);
818 void Sys_Error (char *error, ...);
819 void Sys_Quit (void);
820 char *Sys_GetClipboardData( void );
821 void Sys_CopyProtect (void);
822 
823 /*
824 ==============================================================
825 
826 CLIENT / SERVER SYSTEMS
827 
828 ==============================================================
829 */
830 
831 void CL_Init (void);
832 void CL_Drop (void);
833 void CL_Shutdown (void);
834 void CL_Frame (int msec);
835 void Con_Print (char *text);
836 void SCR_BeginLoadingPlaque (void);
837 
838 void SV_Init (void);
839 void SV_Shutdown (char *finalmsg, qboolean reconnect);
840 void SV_Frame (int msec);
841 
842 
843 
CM_EntityString
char * CM_EntityString(void)
Definition: cmodel.c:662
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
cvar_vars
cvar_t * cvar_vars
Definition: cvar.c:24
NA_IPX
@ NA_IPX
Definition: qcommon.h:547
CL_Drop
void CL_Drop(void)
Definition: cl_main.c:399
Z_Free
void Z_Free(void *ptr)
Definition: common.c:1122
Com_DPrintf
void Com_DPrintf(char *fmt,...)
Definition: common.c:157
sizebuf_s
Definition: qcommon.h:92
frand
float frand(void)
Definition: common.c:1375
value
GLfloat value
Definition: qgl_win.c:63
svc_nop
@ svc_nop
Definition: qcommon.h:232
svc_centerprint
@ svc_centerprint
Definition: qcommon.h:241
MSG_WriteShort
void MSG_WriteShort(sizebuf_t *sb, int c)
Definition: common.c:316
MSG_WriteCoord
void MSG_WriteCoord(sizebuf_t *sb, float f)
Definition: common.c:364
Cbuf_InsertFromDefer
void Cbuf_InsertFromDefer(void)
Definition: cmd.c:159
Sys_CopyProtect
void Sys_CopyProtect(void)
Definition: sys_win.c:191
netchan_t::sock
netsrc_t sock
Definition: qcommon.h:586
Cmd_Init
void Cmd_Init(void)
Definition: cmd.c:881
NET_Sleep
void NET_Sleep(int msec)
Definition: net_wins.c:731
netchan_t::incoming_sequence
int incoming_sequence
Definition: qcommon.h:597
BigShort
short BigShort(short l)
Definition: q_shared.c:945
netchan_t::last_reliable_sequence
int last_reliable_sequence
Definition: qcommon.h:605
netchan_t::incoming_acknowledged
int incoming_acknowledged
Definition: qcommon.h:598
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
Qcommon_Frame
void Qcommon_Frame(int msec)
Definition: common.c:1500
NS_SERVER
@ NS_SERVER
Definition: qcommon.h:549
svc_muzzleflash
@ svc_muzzleflash
Definition: qcommon.h:225
CRC_Block
unsigned short CRC_Block(byte *start, int count)
Definition: crc.c:82
svc_frame
@ svc_frame
Definition: qcommon.h:246
Netchan_CanReliable
qboolean Netchan_CanReliable(netchan_t *chan)
Definition: net_chan.c:175
svc_bad
@ svc_bad
Definition: qcommon.h:222
MSG_WriteDir
void MSG_WriteDir(sizebuf_t *sb, vec3_t vector)
Definition: common.c:438
log_stats_file
FILE * log_stats_file
Definition: common.c:38
COM_Argc
int COM_Argc(void)
Definition: common.c:968
CM_LeafContents
int CM_LeafContents(int leafnum)
Definition: cmodel.c:667
CM_ClusterPHS
byte * CM_ClusterPHS(int cluster)
Definition: cmodel.c:1584
CRC_Init
void CRC_Init(unsigned short *crcvalue)
Definition: crc.c:67
FS_Read
void FS_Read(void *buffer, int len, FILE *f)
Definition: files.c:350
FS_FreeFile
void FS_FreeFile(void *buffer)
Definition: files.c:437
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *sb)
Definition: common.c:731
time_before_game
int time_before_game
Definition: common.c:54
entity_state_s
Definition: q_shared.h:1145
MSG_WriteFloat
void MSG_WriteFloat(sizebuf_t *sb, float f)
Definition: common.c:341
netchan_t::message
sizebuf_t message
Definition: qcommon.h:608
NA_IP
@ NA_IP
Definition: qcommon.h:547
Cbuf_AddEarlyCommands
void Cbuf_AddEarlyCommands(qboolean clear)
Definition: cmd.c:263
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
Com_SetServerState
void Com_SetServerState(int state)
Definition: common.c:266
sizebuf_s::overflowed
qboolean overflowed
Definition: qcommon.h:95
Cvar_Init
void Cvar_Init(void)
Definition: cvar.c:522
Cmd_ExecuteString
void Cmd_ExecuteString(char *text)
Definition: cmd.c:811
svc_inventory
@ svc_inventory
Definition: qcommon.h:229
MSG_WriteDeltaEntity
void MSG_WriteDeltaEntity(struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity)
Definition: common.c:483
CopyString
char * CopyString(char *in)
Definition: common.c:1038
Sys_Error
void Sys_Error(char *error,...)
Definition: sys_win.c:68
sizebuf_s::readcount
int readcount
Definition: qcommon.h:99
Netchan_Setup
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
Definition: net_chan.c:152
bigendien
qboolean bigendien
Definition: q_shared.c:934
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *sb)
Definition: common.c:716
qboolean
qboolean
Definition: q_shared.h:63
Com_BeginRedirect
void Com_BeginRedirect(int target, char *buffer, int buffersize, void(*flush))
Definition: common.c:74
FS_InitFilesystem
void FS_InitFilesystem(void)
Definition: files.c:848
trace_t
Definition: q_shared.h:453
net_message
sizebuf_t net_message
Definition: net_chan.c:82
CM_PointLeafnum
int CM_PointLeafnum(vec3_t p)
Definition: cmodel.c:826
CM_PointContents
int CM_PointContents(vec3_t p, int headnode)
Definition: cmodel.c:917
MSG_ReadString
char * MSG_ReadString(sizebuf_t *sb)
Definition: common.c:773
netchan_t
Definition: qcommon.h:582
Cvar_Userinfo
char * Cvar_Userinfo(void)
Definition: cvar.c:504
buffer
GLenum GLfloat * buffer
Definition: qgl_win.c:151
netchan_t::dropped
int dropped
Definition: qcommon.h:588
NET_AdrToString
char * NET_AdrToString(netadr_t a)
Definition: net_wins.c:161
argv
char * argv[MAX_NUM_ARGVS]
Definition: sys_win.c:56
svc_playerinfo
@ svc_playerinfo
Definition: qcommon.h:243
argc
int argc
Definition: sys_win.c:55
bytedirs
vec3_t bytedirs[NUMVERTEXNORMALS]
Definition: common.c:281
Sys_Init
void Sys_Init(void)
Definition: sys_win.c:238
Sys_UnloadGame
void Sys_UnloadGame(void)
Definition: sys_win.c:488
COM_BlockSequenceCRCByte
byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence)
Definition: common.c:1338
sizebuf_s::data
byte * data
Definition: qcommon.h:96
NA_BROADCAST
@ NA_BROADCAST
Definition: qcommon.h:547
SCR_BeginLoadingPlaque
void SCR_BeginLoadingPlaque(void)
Definition: cl_scrn.c:562
dedicated
cvar_t * dedicated
Definition: common.c:47
CM_BoxLeafnums
int CM_BoxLeafnums(vec3_t mins, vec3_t maxs, int *list, int listsize, int *topnode)
Definition: cmodel.c:903
time_after_game
int time_after_game
Definition: common.c:55
cvar_s
Definition: q_shared.h:324
Com_EndRedirect
void Com_EndRedirect(void)
Definition: common.c:86
NET_CompareBaseAdr
qboolean NET_CompareBaseAdr(netadr_t a, netadr_t b)
Definition: net_wins.c:136
MSG_ReadPos
void MSG_ReadPos(sizebuf_t *sb, vec3_t pos)
Definition: common.c:818
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
Cmd_RemoveCommand
void Cmd_RemoveCommand(char *cmd_name)
Definition: cmd.c:724
CL_Init
void CL_Init(void)
Definition: cl_main.c:1785
Cbuf_ExecuteText
void Cbuf_ExecuteText(int exec_when, char *text)
Definition: cmd.c:171
MSG_WriteChar
void MSG_WriteChar(sizebuf_t *sb, int c)
Definition: common.c:290
Com_ServerState
int Com_ServerState(void)
Definition: common.c:256
MSG_ReadCoord
float MSG_ReadCoord(sizebuf_t *sb)
Definition: common.c:813
NET_StringToAdr
qboolean NET_StringToAdr(char *s, netadr_t *a)
Definition: net_wins.c:262
COM_ClearArgv
void COM_ClearArgv(int arg)
Definition: common.c:980
Sys_ConsoleInput
char * Sys_ConsoleInput(void)
Definition: sys_win.c:289
CM_InlineModel
cmodel_t * CM_InlineModel(char *name)
Definition: cmodel.c:639
MSG_ReadAngle16
float MSG_ReadAngle16(sizebuf_t *sb)
Definition: common.c:830
msg
cvar_t * msg
Definition: cl_main.c:83
pm_airaccelerate
float pm_airaccelerate
Definition: pmove.c:57
sizebuf_s::maxsize
int maxsize
Definition: qcommon.h:97
netchan_t::fatal_error
qboolean fatal_error
Definition: qcommon.h:584
netchan_t::incoming_reliable_acknowledged
int incoming_reliable_acknowledged
Definition: qcommon.h:599
CM_WriteAreaBits
int CM_WriteAreaBits(byte *buffer, int area)
Definition: cmodel.c:1686
SZ_Print
void SZ_Print(sizebuf_t *buf, char *data)
Definition: common.c:926
SCR_DebugGraph
void SCR_DebugGraph(float value, int color)
Definition: cl_scrn.c:137
BigLong
int BigLong(int l)
Definition: q_shared.c:947
LittleFloat
float LittleFloat(float l)
Definition: q_shared.c:950
MSG_ReadChar
int MSG_ReadChar(sizebuf_t *sb)
Definition: common.c:690
Netchan_Transmit
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
Definition: net_chan.c:213
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
SZ_GetSpace
void * SZ_GetSpace(sizebuf_t *buf, int length)
Definition: common.c:898
Cvar_GetLatchedVars
void Cvar_GetLatchedVars(void)
Definition: cvar.c:336
LittleLong
int LittleLong(int l)
Definition: q_shared.c:948
MSG_WritePos
void MSG_WritePos(sizebuf_t *sb, vec3_t pos)
Definition: common.c:369
MSG_WriteDeltaUsercmd
void MSG_WriteDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
Definition: common.c:387
Cbuf_InsertText
void Cbuf_InsertText(char *text)
Definition: cmd.c:114
netadrtype_t
netadrtype_t
Definition: qcommon.h:547
svc_ops_e
svc_ops_e
Definition: qcommon.h:220
NET_SendPacket
void NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
Definition: net_wins.c:400
net_from
netadr_t net_from
Definition: net_chan.c:81
CM_NumClusters
int CM_NumClusters(void)
Definition: cmodel.c:652
Cvar_CompleteVariable
char * Cvar_CompleteVariable(char *partial)
Definition: cvar.c:95
netchan_t::last_sent
int last_sent
Definition: qcommon.h:591
COM_AddParm
void COM_AddParm(char *parm)
Definition: common.c:1016
Netchan_NeedReliable
qboolean Netchan_NeedReliable(netchan_t *chan)
Definition: net_chan.c:183
CL_Shutdown
void CL_Shutdown(void)
Definition: cl_main.c:1831
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:406
COM_Argv
char * COM_Argv(int arg)
Definition: common.c:973
Sys_ConsoleOutput
void Sys_ConsoleOutput(char *string)
Definition: sys_win.c:369
FS_ExecAutoexec
void FS_ExecAutoexec(void)
Definition: files.c:572
CM_HeadnodeVisible
qboolean CM_HeadnodeVisible(int headnode, byte *visbits)
Definition: cmodel.c:1748
MSG_ReadDir
void MSG_ReadDir(sizebuf_t *sb, vec3_t vector)
Definition: common.c:464
CM_WritePortalState
void CM_WritePortalState(FILE *f)
Definition: cmodel.c:1721
Z_Malloc
void * Z_Malloc(int size)
Definition: common.c:1200
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *value, int flags)
Definition: cvar.c:127
Pmove
void Pmove(pmove_t *pmove)
Definition: pmove.c:1240
COM_InitArgv
void COM_InitArgv(int argc, char **argv)
Definition: common.c:993
Sys_Quit
void Sys_Quit(void)
Definition: sys_win.c:91
CRC_ProcessByte
void CRC_ProcessByte(unsigned short *crcvalue, byte data)
Definition: crc.c:72
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
Con_Print
void Con_Print(char *text)
Definition: console.c:352
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
svc_deltapacketentities
@ svc_deltapacketentities
Definition: qcommon.h:245
FS_SetGamedir
void FS_SetGamedir(char *dir)
Definition: files.c:595
error
static int error(vorb *f, enum STBVorbisError e)
Definition: stb_vorbis.c:865
CM_TransformedBoxTrace
trace_t CM_TransformedBoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask, vec3_t origin, vec3_t angles)
Definition: cmodel.c:1451
Z_FreeTags
void Z_FreeTags(int tag)
Definition: common.c:1155
Sys_AppActivate
void Sys_AppActivate(void)
Definition: sys_win.c:467
Cvar_VariableValue
float Cvar_VariableValue(char *var_name)
Definition: cvar.c:63
Cbuf_Init
void Cbuf_Init(void)
Definition: cmd.c:78
MSG_WriteAngle
void MSG_WriteAngle(sizebuf_t *sb, float f)
Definition: common.c:376
host_speeds
cvar_t * host_speeds
Definition: common.c:40
CM_TransformedPointContents
int CM_TransformedPointContents(vec3_t p, int headnode, vec3_t origin, vec3_t angles)
Definition: cmodel.c:937
Netchan_OutOfBand
void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte *data)
Definition: net_chan.c:110
svc_layout
@ svc_layout
Definition: qcommon.h:228
SV_Init
void SV_Init(void)
Definition: sv_main.c:948
userinfo_modified
qboolean userinfo_modified
Definition: cvar.c:485
cmodel_s
Definition: q_shared.h:432
Cmd_TokenizeString
void Cmd_TokenizeString(char *text, qboolean macroExpand)
Definition: cmd.c:620
clc_userinfo
@ clc_userinfo
Definition: qcommon.h:259
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *sb)
Definition: common.c:703
time_before_ref
int time_before_ref
Definition: common.c:56
Cbuf_CopyToDefer
void Cbuf_CopyToDefer(void)
Definition: cmd.c:147
CM_LeafCluster
int CM_LeafCluster(int leafnum)
Definition: cmodel.c:674
MSG_WriteLong
void MSG_WriteLong(sizebuf_t *sb, int c)
Definition: common.c:330
Cvar_FullSet
cvar_t * Cvar_FullSet(char *var_name, char *value, int flags)
Definition: cvar.c:288
svc_disconnect
@ svc_disconnect
Definition: qcommon.h:233
svc_serverdata
@ svc_serverdata
Definition: qcommon.h:238
name
cvar_t * name
Definition: cl_main.c:79
Qcommon_Init
void Qcommon_Init(int argc, char **argv)
Definition: common.c:1407
CM_SetAreaPortalState
void CM_SetAreaPortalState(int portalnum, qboolean open)
Definition: cmodel.c:1653
NET_Config
void NET_Config(qboolean multiplayer)
Definition: net_wins.c:695
netchan_t::remote_address
netadr_t remote_address
Definition: qcommon.h:593
CM_LoadMap
cmodel_t * CM_LoadMap(char *name, qboolean clientload, unsigned *checksum)
Definition: cmodel.c:548
CM_LeafArea
int CM_LeafArea(int leafnum)
Definition: cmodel.c:681
s
static fixed16_t s
Definition: r_scan.c:30
MAX_MSGLEN
#define MAX_MSGLEN
Definition: qcommon.h:544
Cvar_WriteVariables
void Cvar_WriteVariables(char *path)
Definition: cvar.c:429
netchan_t::reliable_length
int reliable_length
Definition: qcommon.h:612
netadr_t::type
netadrtype_t type
Definition: qcommon.h:553
SV_Shutdown
void SV_Shutdown(char *finalmsg, qboolean reconnect)
Definition: sv_main.c:1035
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:227
Cvar_ForceSet
cvar_t * Cvar_ForceSet(char *var_name, char *value)
Definition: cvar.c:268
NET_Init
void NET_Init(void)
Definition: net_wins.c:767
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:398
MSG_ReadFloat
float MSG_ReadFloat(sizebuf_t *sb)
Definition: common.c:748
Cvar_Command
qboolean Cvar_Command(void)
Definition: cvar.c:363
Netchan_OutOfBandPrint
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
Definition: net_chan.c:132
MSG_ReadStringLine
char * MSG_ReadStringLine(sizebuf_t *sb)
Definition: common.c:793
COM_CheckParm
int COM_CheckParm(char *parm)
Definition: common.c:955
FS_FOpenFile
int FS_FOpenFile(char *filename, FILE **file)
Definition: files.c:206
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
qport
cvar_t * qport
Definition: net_chan.c:79
SZ_Clear
void SZ_Clear(sizebuf_t *buf)
Definition: common.c:892
netchan_t::outgoing_sequence
int outgoing_sequence
Definition: qcommon.h:603
NET_IsLocalAddress
qboolean NET_IsLocalAddress(netadr_t adr)
Definition: net_wins.c:282
CM_AreasConnected
qboolean CM_AreasConnected(int area1, int area2)
Definition: cmodel.c:1662
Cmd_CompleteCommand
char * Cmd_CompleteCommand(char *partial)
Definition: cmd.c:772
log_stats
cvar_t * log_stats
Definition: common.c:41
CM_ClusterPVS
byte * CM_ClusterPVS(int cluster)
Definition: cmodel.c:1575
netchan_t::reliable_sequence
int reliable_sequence
Definition: qcommon.h:604
usercmd_s
Definition: q_shared.h:517
CM_NumInlineModels
int CM_NumInlineModels(void)
Definition: cmodel.c:657
Com_BlockChecksum
unsigned Com_BlockChecksum(void *buffer, int length)
Definition: md4.c:213
SV_Frame
void SV_Frame(int msec)
Definition: sv_main.c:760
NET_Shutdown
void NET_Shutdown(void)
Definition: net_wins.c:793
NS_CLIENT
@ NS_CLIENT
Definition: qcommon.h:549
NET_GetPacket
qboolean NET_GetPacket(netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
Definition: net_wins.c:336
netchan_t::last_received
int last_received
Definition: qcommon.h:590
svc_configstring
@ svc_configstring
Definition: qcommon.h:239
Cvar_Serverinfo
char * Cvar_Serverinfo(void)
Definition: cvar.c:510
netadr_t::port
unsigned short port
Definition: qcommon.h:558
Netchan_Init
void Netchan_Init(void)
Definition: net_chan.c:91
netsrc_t
netsrc_t
Definition: qcommon.h:549
xcommand_t
void(* xcommand_t)(void)
Definition: qcommon.h:419
Com_Quit
void Com_Quit(void)
Definition: common.c:235
NA_BROADCAST_IPX
@ NA_BROADCAST_IPX
Definition: qcommon.h:547
time_after_ref
int time_after_ref
Definition: common.c:57
sizebuf_s::allowoverflow
qboolean allowoverflow
Definition: qcommon.h:94
Qcommon_Shutdown
void Qcommon_Shutdown(void)
Definition: common.c:1600
SZ_Init
void SZ_Init(sizebuf_t *buf, byte *data, int length)
Definition: common.c:885
netchan_t::incoming_reliable_sequence
int incoming_reliable_sequence
Definition: qcommon.h:601
clc_bad
@ clc_bad
Definition: qcommon.h:256
sizebuf_s::cursize
int cursize
Definition: qcommon.h:98
CM_HeadnodeForBox
int CM_HeadnodeForBox(vec3_t mins, vec3_t maxs)
Definition: cmodel.c:775
net_message_buffer
byte net_message_buffer[MAX_MSGLEN]
Definition: net_chan.c:83
format
GLsizei GLenum format
Definition: qgl_win.c:131
netadr_t
Definition: qcommon.h:551
MSG_WriteString
void MSG_WriteString(sizebuf_t *sb, char *s)
Definition: common.c:356
crand
float crand(void)
Definition: common.c:1380
svc_packetentities
@ svc_packetentities
Definition: qcommon.h:244
sizebuf_t
struct sizebuf_s sizebuf_t
FS_FCloseFile
void FS_FCloseFile(FILE *f)
Definition: files.c:149
MSG_ReadAngle
float MSG_ReadAngle(sizebuf_t *sb)
Definition: common.c:825
clc_ops_e
clc_ops_e
Definition: qcommon.h:254
FS_NextPath
char * FS_NextPath(char *prevpath)
Definition: files.c:821
Cmd_ForwardToServer
void Cmd_ForwardToServer(void)
Definition: cl_main.c:286
SZ_Write
void SZ_Write(sizebuf_t *buf, void *data, int length)
Definition: common.c:921
MSG_ReadDeltaUsercmd
void MSG_ReadDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
Definition: common.c:835
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
Info_Print
void Info_Print(char *s)
Definition: common.c:1049
svc_download
@ svc_download
Definition: qcommon.h:242
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
NET_CompareAdr
qboolean NET_CompareAdr(netadr_t a, netadr_t b)
Definition: net_wins.c:104
BigFloat
float BigFloat(float l)
Definition: q_shared.c:949
svc_reconnect
@ svc_reconnect
Definition: qcommon.h:234
COM_Init
void COM_Init(void)
svc_spawnbaseline
@ svc_spawnbaseline
Definition: qcommon.h:240
clc_stringcmd
@ clc_stringcmd
Definition: qcommon.h:260
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:559
NUMVERTEXNORMALS
#define NUMVERTEXNORMALS
Definition: qcommon.h:792
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:226
clc_move
@ clc_move
Definition: qcommon.h:258
Cbuf_AddLateCommands
qboolean Cbuf_AddLateCommands(void)
Definition: cmd.c:296
svc_sound
@ svc_sound
Definition: qcommon.h:235
Cmd_Args
char * Cmd_Args(void)
Definition: cmd.c:531
CM_ReadPortalState
void CM_ReadPortalState(FILE *f)
Definition: cmodel.c:1734
MSG_WriteByte
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition: common.c:303
svc_stufftext
@ svc_stufftext
Definition: qcommon.h:237
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1150
Sys_GetClipboardData
char * Sys_GetClipboardData(void)
Definition: sys_win.c:431
Cmd_Exists
qboolean Cmd_Exists(char *cmd_name)
Definition: cmd.c:752
CRC_Value
unsigned short CRC_Value(unsigned short crcvalue)
Definition: crc.c:77
clc_nop
@ clc_nop
Definition: qcommon.h:257
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
NA_LOOPBACK
@ NA_LOOPBACK
Definition: qcommon.h:547
Sys_GetGameAPI
void * Sys_GetGameAPI(void *parms)
Definition: sys_win.c:502
pmove_t
Definition: q_shared.h:529
Z_TagMalloc
void * Z_TagMalloc(int size, int tag)
Definition: common.c:1172
svc_print
@ svc_print
Definition: qcommon.h:236
MSG_WriteAngle16
void MSG_WriteAngle16(sizebuf_t *sb, float f)
Definition: common.c:381
CL_Frame
void CL_Frame(int msec)
Definition: cl_main.c:1681
Netchan_Process
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
Definition: net_chan.c:298
Cvar_VariableString
char * Cvar_VariableString(char *var_name)
Definition: cvar.c:79
void
void(APIENTRY *qglAccum)(GLenum op
count
GLint GLsizei count
Definition: qgl_win.c:128
MSG_BeginReading
void MSG_BeginReading(sizebuf_t *sb)
Definition: common.c:684
CM_BoxTrace
trace_t CM_BoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask)
Definition: cmodel.c:1350
FS_CreatePath
void FS_CreatePath(char *path)
Definition: files.c:125
developer
cvar_t * developer
Definition: common.c:42
netchan_t::qport
int qport
Definition: qcommon.h:594
MSG_ReadData
void MSG_ReadData(sizebuf_t *sb, void *buffer, int size)
Definition: common.c:874