FTEQW
Documentation of the FTE engine source tree.
protocol.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20// protocol.h -- communications protocols
21
22#include "bothdefs.h"
23
24#define PEXT_SETVIEW 0x00000001
25
26#define PEXT_SCALE 0x00000002
27#define PEXT_LIGHTSTYLECOL 0x00000004
28#define PEXT_TRANS 0x00000008
29#define PEXT_VIEW2_ 0x00000010
30//#define PEXT_BULLETENS 0x00000020 //obsolete
31#define PEXT_ACCURATETIMINGS 0x00000040
32#define PEXT_SOUNDDBL 0x00000080 //revised startsound protocol
33#define PEXT_FATNESS 0x00000100 //GL only (or servers)
34#define PEXT_HLBSP 0x00000200
35#define PEXT_TE_BULLET 0x00000400
36#define PEXT_HULLSIZE 0x00000800
37#define PEXT_MODELDBL 0x00001000
38#define PEXT_ENTITYDBL 0x00002000 //max of 1024 ents instead of 512
39#define PEXT_ENTITYDBL2 0x00004000 //max of 1024 ents instead of 512
40#define PEXT_FLOATCOORDS 0x00008000 //supports floating point origins.
41//#define PEXT_VWEAP 0x00010000 //cause an extra qbyte to be sent, and an extra list of models for vweaps.
42#define PEXT_Q2BSP_ 0x00020000
43#define PEXT_Q3BSP_ 0x00040000
44
45#define PEXT_COLOURMOD 0x00080000 //this replaces an older value which would rarly have caried any actual data.
46
47#define PEXT_SPLITSCREEN 0x00100000
48#define PEXT_HEXEN2 0x00200000 //more stats and working particle builtin.
49#define PEXT_SPAWNSTATIC2 0x00400000 //Sends an entity delta instead of a baseline.
50#define PEXT_CUSTOMTEMPEFFECTS 0x00800000 //supports custom temp ents.
51#define PEXT_256PACKETENTITIES 0x01000000 //Client can recieve 256 packet entities.
52//#define PEXT_NEVERUSED 0x02000000 //reserved for a future multicastmask
53#define PEXT_SHOWPIC 0x04000000
54#define PEXT_SETATTACHMENT 0x08000000 //md3 tags (needs networking, they need to lerp).
55//#define PEXT_NEVERUSED 0x10000000 //reserved for a future multicastmask
56#define PEXT_CHUNKEDDOWNLOADS 0x20000000 //alternate file download method. Hopefully it'll give quadroupled download speed, especially on higher pings.
57#define PEXT_CSQC 0x40000000 //csqc additions
58#define PEXT_DPFLAGS 0x80000000 //extra flags for viewmodel/externalmodel and possible other persistant style flags.
59#define PEXT_SERVERADVERTISE ~0u
60#define PEXT_CLIENTSUPPORT (PEXT_SETVIEW|PEXT_SCALE|PEXT_LIGHTSTYLECOL|PEXT_TRANS|PEXT_VIEW2_|PEXT_ACCURATETIMINGS|PEXT_SOUNDDBL|PEXT_FATNESS|PEXT_HLBSP|PEXT_TE_BULLET|PEXT_HULLSIZE|PEXT_MODELDBL|PEXT_ENTITYDBL|PEXT_ENTITYDBL2|PEXT_FLOATCOORDS|PEXT_Q2BSP_|PEXT_Q3BSP_|PEXT_COLOURMOD|PEXT_SPLITSCREEN|PEXT_HEXEN2|PEXT_SPAWNSTATIC2|PEXT_CUSTOMTEMPEFFECTS|PEXT_256PACKETENTITIES|PEXT_SHOWPIC|PEXT_SETATTACHMENT|PEXT_CHUNKEDDOWNLOADS|PEXT_CSQC|PEXT_DPFLAGS)
61
62#ifdef CSQC_DAT
63 #define PEXT_BIGUSERINFOS PEXT_CSQC //FIXME: while useful for csqc, we should include something else that isn't so often stripped, or is available in ezquake, or something.
64#else
65 #define PEXT_BIGUSERINFOS 0xffffffff
66#endif
67#ifdef SIDEVIEWS
68 #define PEXT_VIEW2 PEXT_VIEW2_
69#endif
70#ifdef Q2BSPS
71 #define PEXT_Q2BSP PEXT_Q2BSP_
72#endif
73#ifdef Q3BSPS
74 #define PEXT_Q3BSP PEXT_Q3BSP_
75#endif
76#define PEXT1_HIDEPROTOCOLS (PEXT_Q3BSP_|PEXT_Q2BSP_|PEXT_HLBSP) //These are hints for the server, and not useful to the client (they can figure stuff out themselves)
77
78#define PEXT2_PRYDONCURSOR 0x00000001
79#define PEXT2_VOICECHAT 0x00000002
80#define PEXT2_SETANGLEDELTA 0x00000004
81#define PEXT2_REPLACEMENTDELTAS 0x00000008 //weaponframe was part of the entity state. that flag is now the player's v_angle.
82#define PEXT2_MAXPLAYERS 0x00000010 //Client is able to cope with more players than 32. abs max becomes 255, due to colormap issues.
83#define PEXT2_PREDINFO 0x00000020 //movevar stats, NQ input sequences+acks.
84#define PEXT2_NEWSIZEENCODING 0x00000040 //richer size encoding.
85#define PEXT2_INFOBLOBS 0x00000080 //serverinfo+userinfo lengths can be MUCH higher (protocol is unbounded, but expect low sanity limits on userinfo), and contain nulls etc.
86#define PEXT2_STUNAWARE 0x00000100 //changes the netchan to biased-bigendian (so lead two bits are 1 and not stun's 0, so we don't get confused)
87#define PEXT2_VRINPUTS 0x00000200 //clc_move changes, more buttons etc. vr stuff!
88#define PEXT2_LERPTIME 0x00000400 //fitz-bloat parity. redefines UF_16BIT as UF_LERPEND in favour of length coding.
89#define PEXT2_SERVERADVERTISE ~0u
90#define PEXT2_CLIENTSUPPORT (PEXT2_PRYDONCURSOR|PEXT2_VOICECHAT|PEXT2_SETANGLEDELTA|PEXT2_REPLACEMENTDELTAS|PEXT2_MAXPLAYERS|PEXT2_PREDINFO|PEXT2_NEWSIZEENCODING|PEXT2_INFOBLOBS|PEXT2_STUNAWARE|PEXT2_VRINPUTS|PEXT2_LERPTIME) //warn if we see bits not listed here.
91
92//EzQuake/Mvdsv extensions. (use ezquake name, to avoid confusion about .mvd format and its protocol differences)
93#define EZPEXT1_FLOATENTCOORDS 0x00000001 //quirky - doesn't apply to broadcasts, just players+ents. this gives more precision, but will bug out if you try using it to increase map bounds in ways that may not be immediately apparent. iiuc this was added instead of fixing some inconsistent rounding...
94#define EZPEXT1_SETANGLEREASON 0x00000002 //specifies the reason for an svc_setangles call. the mvdsv implementation will fuck over any mods that writebyte them. we'd need to modify our preparse stuff to work around the issue.
95#define EZPEXT1_SERVERADVERTISE EZPEXT1_FLOATENTCOORDS/* - implemented, but interactions with replacementdeltas is not defined*/ /*EZPEXT1_SETANGLEREASON - potentially causes compat issues with mods that stuffcmd it (common in nq)*/
96#define EZPEXT1_CLIENTADVERTISE EZPEXT1_FLOATENTCOORDS //might as well ask for it, as a way around mvdsv's writecoord/PM_NudgePosition rounding difference bug.
97#define EZPEXT1_CLIENTSUPPORT (EZPEXT1_FLOATENTCOORDS|EZPEXT1_SETANGLEREASON) //ones we can support in demos. warning if other bits.
98
99//ZQuake transparent protocol extensions.
100#define Z_EXT_PM_TYPE (1<<0) // basic PM_TYPE functionality (reliable jump_held)
101#define Z_EXT_PM_TYPE_NEW (1<<1) // adds PM_FLY, PM_SPECTATOR
102#define Z_EXT_VIEWHEIGHT (1<<2) // STAT_VIEWHEIGHT
103#define Z_EXT_SERVERTIME (1<<3) // STAT_TIME
104#define Z_EXT_PITCHLIMITS (1<<4) // serverinfo maxpitch & minpitch
105#define Z_EXT_JOIN_OBSERVE (1<<5) // server: "join" and "observe" commands are supported
106 // client: on-the-fly spectator <-> player switching supported
107
108#define Z_EXT_PF_ONGROUND (1<<6) // server: PF_ONGROUND is valid for all svc_playerinfo
109#define Z_EXT_VWEP (1<<7)
110#define Z_EXT_PF_SOLID (1<<8) //conflicts with many FTE extensions.
111
112#ifdef QUAKESTATS
113#define SERVER_SUPPORTED_Z_EXTENSIONS (Z_EXT_PM_TYPE|Z_EXT_PM_TYPE_NEW|Z_EXT_VIEWHEIGHT|Z_EXT_SERVERTIME|Z_EXT_PITCHLIMITS|Z_EXT_JOIN_OBSERVE|Z_EXT_PF_ONGROUND|Z_EXT_VWEP|Z_EXT_PF_SOLID)
114#else
115#define SERVER_SUPPORTED_Z_EXTENSIONS (Z_EXT_PM_TYPE|Z_EXT_PM_TYPE_NEW|Z_EXT_PITCHLIMITS|Z_EXT_JOIN_OBSERVE|Z_EXT_PF_ONGROUND|Z_EXT_VWEP|Z_EXT_PF_SOLID)
116#endif
117#define BUGGY_EZQUAKE_Z_EXTENSIONS (Z_EXT_PF_ONGROUND|Z_EXT_PF_SOLID) //ezquake bugs out on these when ANY fteextension is present. hack the serverinfo to hide these.
118#define CLIENT_SUPPORTED_Z_EXTENSIONS (SERVER_SUPPORTED_Z_EXTENSIONS|Z_EXT_PF_ONGROUND|Z_EXT_PF_SOLID)
119
120
121#define PROTOCOL_VERSION_VARLENGTH (('v'<<0) + ('l'<<8) + ('e'<<16) + ('n' << 24)) //variable length handshake
122
123#define PROTOCOL_VERSION_FTE1 (('F'<<0) + ('T'<<8) + ('E'<<16) + ('X' << 24)) //fte extensions.
124#define PROTOCOL_VERSION_FTE2 (('F'<<0) + ('T'<<8) + ('E'<<16) + ('2' << 24)) //fte extensions.
125#define PROTOCOL_VERSION_EZQUAKE1 (('M'<<0) + ('V'<<8) + ('D'<<16) + ('1' << 24)) //ezquake/mvdsv extensions
126#define PROTOCOL_VERSION_HUFFMAN (('H'<<0) + ('U'<<8) + ('F'<<16) + ('F' << 24)) //packet compression
127#define PROTOCOL_VERSION_FRAGMENT (('F'<<0) + ('R'<<8) + ('A'<<16) + ('G' << 24)) //supports fragmentation/packets larger than 1450
128#ifdef HAVE_DTLS
129#define PROTOCOL_VERSION_DTLSUPGRADE (('D'<<0) + ('T'<<8) + ('L'<<16) + ('S' << 24)) //server supports dtls. clients should dtlsconnect THEN continue connecting (also allows dtls rcon!).
130#endif
131
132#define PROTOCOL_INFO_GUID (('G'<<0) + ('U'<<8) + ('I'<<16) + ('D' << 24)) //globally 'unique' client id info.
133
134#define PROTOCOL_VERSION_QW 28
135
136#define PROTOCOL_VERSION_Q2_DEMO_MIN 26 //we can parse this server
137#define PROTOCOL_VERSION_Q2_MIN 31 //we can join these outdated servers
138#define PROTOCOL_VERSION_Q2 34 //we host this
139#define PROTOCOL_VERSION_R1Q2 35
140#define PROTOCOL_VERSION_Q2PRO 36
141
142#define PROTOCOL_VERSION_Q2_DEMO_MAX PROTOCOL_VERSION_Q2PRO
143
144//=========================================
145
146//#define GAME_DEFAULTPORT XXXXX //rebranding allows selection of a different default port, which slightly reduces protocol conflicts.
147#define PORT_NQSERVER 26000
148#define PORT_DPMASTER PORT_Q3MASTER
149#define PORT_QWCLIENT 27001
150#define PORT_QWMASTER 27000
151#define PORT_QWSERVER 27500
152#define PORT_H2SERVER 26900
153#define PORT_Q2MASTER 27900
154#define PORT_Q2CLIENT 27901
155#define PORT_Q2SERVER 27910
156#define PORT_Q3MASTER 27950
157#define PORT_Q3SERVER 27960
158#define PORT_ICEBROKER PORT_DPMASTER
159
160#ifdef GAME_DEFAULTPORT
161 #define PORT_DEFAULTSERVER GAME_DEFAULTPORT
162#else
163 #define PORT_DEFAULTSERVER PORT_QWSERVER
164#endif
165
166//=========================================
167
168// out of band message id bytes
169
170// M = master, S = server, C = client, A = any
171// the second character will always be \n if the message isn't a single
172// qbyte long (?? not true anymore?)
173
174#define S2C_CHALLENGE 'c'
175#define S2C_CONNECTION 'j'
176#define A2A_PING 'k' // respond with an A2A_ACK
177#define A2A_ACK 'l' // general acknowledgement without info
178#define A2A_NACK 'm' // [+ comment] general failure
179#define A2A_ECHO 'e' // for echoing
180#define A2C_PRINT 'n' // print a message on client
181
182#define S2M_HEARTBEAT 'a' // + serverinfo + userlist + fraglist
183#define A2C_CLIENT_COMMAND 'B' // + command line
184#define S2M_SHUTDOWN 'C'
185
186#define C2M_MASTER_REQUEST 'c'
187#define M2C_MASTER_REPLY 'd' // + \n + qw server port list
188//==================
189// note that there are some defs.qc that mirror to these numbers
190// also related to svc_strings[] in cl_parse
191//==================
192
193//
194// server to client
195//
196#define svc_bad 0
197#define svc_nop 1
198#define svc_disconnect 2
199#define svcqw_updatestatbyte 3 // [qbyte] [qbyte]
200#define svcnq_updatestatlong 3 // [qbyte] [long]
201#define svc_version 4 // [long] server version
202#define svc_setview 5 // [short] entity number
203#define svc_sound 6 // <see code>
204#define svc_time 7 // [float] server time
205#define svc_print 8 // [qbyte] id [string] null terminated string
206#define svc_stufftext 9 // [string] stuffed into client's console buffer
207 // the string should be \n terminated
208#define svc_setangle 10 // [angle3] set the view angle to this absolute value
209
210#define svc_serverdata 11 // [long] protocol ...
211#define svc_lightstyle 12 // [qbyte] [string]
212#define svc_updatename 13 // [qbyte] [string]
213#define svc_updatefrags 14 // [qbyte] [short]
214#define svcnq_clientdata 15 // <shortbits + data>
215#define svc_stopsound 16 // <see code>
216#define svc_updatecolors 17 // [qbyte] [qbyte] [qbyte]
217#define svc_particle 18 // [vec3] <variable>
218#define svc_damage 19
219
220#define svc_spawnstatic 20
221#define svcfte_spawnstatic2 21
222#define svc_spawnbaseline 22
223
224#define svc_temp_entity 23 // variable
225#define svc_setpause 24 // [qbyte] on / off
226#define svcnq_signonnum 25 // [qbyte] used for the signon sequence
227#define svcfte_splitscreenconfig 25 // [qbyte] seats, player[seat]. spectator flags passed via userinfo.
228
229#define svc_centerprint 26 // [string] to put in center of the screen
230
231#define svc_killedmonster 27
232#define svc_foundsecret 28
233
234#define svc_spawnstaticsound 29 // [coord3] [qbyte] samp [qbyte] vol [qbyte] aten
235
236#define svc_intermission 30 // [vec3_t] origin [vec3_t] angle
237#define svc_finale 31 // [string] text
238
239#define svc_cdtrack 32 // [qbyte] track
240#define svc_sellscreen 33
241
242#define svc_cutscene 34 //hmm... nq only... added after qw tree splitt?
243
244
245
246//QW svcs
247#define svc_smallkick 34 // set client punchangle to 2
248#define svc_bigkick 35 // set client punchangle to 4
249
250#define svc_updateping 36 // [qbyte] [short]
251#define svc_updateentertime 37 // [qbyte] [float]
252
253#define svcqw_updatestatlong 38 // [qbyte] [long]
254
255#define svc_muzzleflash 39 // [short] entity
256
257#define svc_updateuserinfo 40 // [qbyte] slot [long] uid [string] userinfo
258
259#define svc_download 41 // [short] size [size bytes]
260#define svc_playerinfo 42 // variable
261#define svc_nails 43 // [qbyte] num [48 bits] xyzpy 12 12 12 4 8
262#define svc_chokecount 44 // [qbyte] packets choked
263#define svc_modellist 45 // [strings]
264#define svc_soundlist 46 // [strings]
265#define svc_packetentities 47 // [...]
266#define svc_deltapacketentities 48 // [...]
267#define svc_maxspeed 49 // maxspeed change, for prediction
268#define svc_entgravity 50 // gravity change, for prediction
269#define svc_setinfo 51 // setinfo on a client
270#define svc_serverinfo 52 // serverinfo
271#define svc_updatepl 53 // [qbyte] [qbyte]
272
273//mvdsv extended svcs (for mvd playback)
274#define svc_nails2 54 //qwe - [qbyte] num [52 bits] nxyzpy 8 12 12 12 4 8
275
276//FTE extended svcs
277#ifdef PEXT_SOUNDDBL
278#define svcfte_soundextended 55
279#define svcfte_soundlistshort 56
280#endif
281#ifdef PEXT_LIGHTSTYLECOL
282#define svcfte_lightstylecol 57
283#endif
284
285//#define svcfte_svcremoved 58
286
287//#define svcfte_svcremoved 59
288
289#ifdef PEXT_MODELDBL
290#define svcfte_modellistshort 60 // [strings]
291#endif
292
293//#define svc_ftesetclientpersist 61 //ushort DATA
294
295#define svc_setportalstate 62
296
297#define svcfte_particle2 63
298#define svcfte_particle3 64
299#define svcfte_particle4 65
300#define svcfte_spawnbaseline2 66
301
302#define svcfte_customtempent 67
303
304#define svcfte_choosesplitclient 68
305#define svcfte_showpic 69
306#define svcfte_hidepic 70
307#define svcfte_movepic 71
308#define svcfte_updatepic 72
309
310//73
311
312#define svcfte_effect 74 // [vector] org [byte] modelindex [byte] startframe [byte] framecount [byte] framerate
313#define svcfte_effect2 75 // [vector] org [short] modelindex [short] startframe [byte] framecount [byte] framerate
314
315#define svcfte_csqcentities 76 //entity lump for csqc
316
317#define svcfte_precache 77
318
319#define svcfte_updatestatstring 78
320#define svcfte_updatestatfloat 79
321
322#define svcfte_trailparticles 80 // [short] entnum [short] effectnum [vector] start [vector] end
323#define svcfte_pointparticles 81 // [short] effectnum [vector] start [vector] velocity [short] count
324#define svcfte_pointparticles1 82 // [short] effectnum [vector] start, same as svc_pointparticles except velocity is zero and count is 1
325
326#define svcfte_cgamepacket 83
327#define svcfte_voicechat 84
328#define svcfte_setangledelta 85 // [angle3] add this to the current viewangles
329#define svcfte_updateentities 86
330#define svcfte_brushedit 87 // networked brush editing, paired with clcfte_brushedit.
331#define svcfte_updateseats 88 // byte count, byte playernum[count]
332#define svcfte_setinfoblob 89 // [8] 1-based index [string] key [32] isfinal<<31|offset [16] chunksize [chunksize] data
333#define svcfte_cgamepacket_sized 90 //svcfte_cgamepacket with an extra short size right after the svc.
334#define svcfte_temp_entity_sized 91 //svc_temp_entity with an extra short size right after the svc (high bit means nq, unset means qw).
335#define svcfte_csqcentities_sized 92 //entity lump for csqc (with size info)
336#define svcfte_setanglebase 93 //updates the base angle (and optionally locks the view, otherwise nudging it without race conditions.)
337#define svcfte_spawnstaticsound2 94 //*sigh*
338
339//fitz svcs
340#define svcfitz_skybox 37
341#define svcfitz_bf 40
342#define svcfitz_fog 41
343#define svcfitz_spawnbaseline2 42
344#define svcfitz_spawnstatic2 43
345#define svcfitz_spawnstaticsound2 44
346
347//nehahra svcs
348#define svcneh_skyboxsize 50 // [coord] size (default is 4096)
349#define svcneh_fog 51 // [byte] enable <optional past this point, only included if enable is true> [float] density [byte] red [byte] green [byte] blue
350
351//QuakeEx(aka: rerelease) svcs.
352// these are not really documented anywhere. we're trying to stick with protocol 15 (because that's the only documented protocol it supports properly thanks to demos)
353// however we still need some special case svcs
354// (there's also some problematic c2s differences too)
355#define svcqex_updateping 46 // [byte] slot, [signed_qe] ping
356#define svcqex_updatesocial 47 // [byte] slot, 8 bytes of unknown
357#define svcqex_updateplinfo 48 // [byte] slot, [leb128] health, [leb128] armour
358#define svcqex_locprint 49 // uses qe's localised string formatting, otherwise treat as svc_print.
359#define svcqex_servervars 50 // [leb128] changedvalues, [???] value...
360#define svcqex_seq 51 // [leb128] input sequence ack
361#define svcqex_achievement 52 // [string] codename
362#define svcqex_chat 53
363#define svcqex_levelcompleted 54
364#define svcqex_backtolobby 55
365#define svcqex_localsound 56
366#define svcqex_prompt 57
367#define svcqex_loccenterprint 58 // [string] codename
368
369//DP extended svcs
370#define svcdp_downloaddata 50
371#define svcdp_updatestatbyte 51
372#define svcnq_effect 52 // [vector] org [byte] modelindex [byte] startframe [byte] framecount [byte] framerate
373#define svcnq_effect2 53 // [vector] org [short] modelindex [short] startframe [byte] framecount [byte] framerate
374#define svcdp_precache 54 // [short] precacheindex [string] filename, precacheindex is + 0 for modelindex and +32768 for soundindex
375#define svcdp_spawnbaseline2 55
376#define svcdp_spawnstatic2 56
377#define svcdp_entities 57
378#define svcdp_csqcentities 58
379#define svcdp_spawnstaticsound2 59 // [coord3] [short] samp [byte] vol [byte] aten
380#define svcdp_trailparticles 60 // [short] entnum [short] effectnum [vector] start [vector] end
381#define svcdp_pointparticles 61 // [short] effectnum [vector] start [vector] velocity [short] count
382#define svcdp_pointparticles1 62 // [short] effectnum [vector] start, same as svc_pointparticles except velocity is zero and count is 1
383
384
385
386#define svc_invalid 256
387
388
390{
391 ccmd_bad = 0, //abort!
392 ccmd_stuffcmd, //regular ol stuffcmd
393 //string concommand
394 ccmd_setcvar, //master->server to order a cvar change.
396 //string message
398 //serverid
399 ccmd_lostplayer, //player dropped/timed out
400 //long plid
401 ccmd_foundplayer, //server->master, saying that a player tried to connect directly (and we need their info)
402 //string name
403 //string clientaddress
404 //string guid
405 ccmd_takeplayer, //master->server, saying to allocate a slot for a player.
406 //long plid
407 //long fromsvid (0=no reply needed)
408 //byte statcount
409 //float stats[statcount]
410 ccmd_transferplayer, //server->master, asking to move them to a new server.
411 //long plid
412 //string map
413 //byte ipv4=0, ipv6=1
414 //byte statcount
415 //float stats[statcount]
416 ccmd_transferedplayer, //master->server, saying the transfer was completed. original server no longer owns the player.
417 //long toserver,
418 //long playerid
419 ccmd_tookplayer, //server->master->server, saying that a player was taken.
420 //long svid (this is always the *other* server)
421 //long plid
422 //string addr (this is the client's address when sent to the master, and the server's address that took the message in the message to the source server)
423 ccmd_transferabort, //server->master->server, saying that a player was rejected.
424 //long plid
425 //long fromsvid
426 //string server
427 ccmd_saveplayer, //server->master, saves a player's stats.
428 //long plid
429 //byte statcount
430 //float stats[statcount]
431 ccmd_serveraddress, //server->master, contains a few net addresses
432 //string addresses[]
433 //byte 0
435 //string dest (black = broadcast to all)
436 //string source (player name)
437 //string cmd (type of event, handled by receiving server/forwarded to client)
438 //string msg (extra info, like the typed text)
439};
440
441
443{
445
446 // these ops are known to the game dll
452
453 // the rest are private to the client and server
457 svcq2_sound, //9 // <see code>
458 svcq2_print, //10 // [qbyte] id [string] null terminated string
459 svcq2_stufftext, //11 // [string] stuffed into client's console buffer, should be \n terminated
460 svcq2_serverdata, //12 // [long] protocol ...
461 svcq2_configstring, //13 // [short] [string]
463 svcq2_centerprint, //15 // [string] to put in center of the screen
464 svcq2_download, //16 // [short] size [size bytes]
465 svcq2_playerinfo, //17 // variable
468 svcq2_frame, //20 (the bastard to implement.)
469
470
477};
478
480{
483 clcq2_move = 2, // [[usercmd_t]
484 clcq2_userinfo = 3, // [[userinfo string]
485 clcq2_stringcmd = 4, // [string] message
486
487 clcr1q2_setting = 5, // [setting][value] R1Q2 settings support.
488 clcr1q2_multimoves = 6, // for crappy clients that can't lerp
489
490 //fte-extended
492#ifdef VOICECHAT
493 clcq2_voicechat = 31
494#endif
496
497enum {
504enum {
508
509//==============================================
510
511//
512// client to server
513//
514#define clc_bad 0
515#define clc_nop 1
516#define clc_disconnect 2 //nq only
517#define clc_move 3 // [[usercmd_t]
518#define clc_stringcmd 4 // [string] message
519#define clc_delta 5 // [qbyte] sequence number, requests delta compression of message
520#define clc_tmove 6 // teleport request, spectator only
521#define clc_upload 7 //
522
523#define clcdp_ackframe 50
524#define clcdp_ackdownloaddata 51
525
526#define clcfte_qcrequest 81
527#define clcfte_prydoncursor 82
528#define clcfte_voicechat 83
529#define clcfte_brushedit 84
530#define clcfte_move 85 //part of PEXT2_VRINPUTS. replaces clc_move+clcfte_prydoncursor+clcdp_ackframe
531#define clcfte_stringcmd_seat 86
532
533#define VRM_LOSS (1u<<0) //for server packetloss reports
534#define VRM_DELAY (1u<<1) //for server to compute lag properly.
535#define VRM_SEATS (1u<<2) //for splitscreen to work properly
536#define VRM_FRAMES (1u<<3) //number of input frames in this packet.
537#define VRM_ACKS (1u<<4) //number of sequence acks included in message.
538
539//==============================================
540
541#define DLERR_FILENOTFOUND -1 //server cannot serve the file
542#define DLERR_PERMISSIONS -2 //server refuses to serve the file
543#define DLERR_UNKNOWN -3 //server bugged out while trying to serve the request
544#define DLERR_REDIRECTFILE -4 //client should download the specified file instead.
545#define DLERR_REDIRECTPACK -5 //client should download the specified package instead.
546#define DLERR_PACKAGE -6 //not networked. packages require special file access.
547
548#define DLBLOCKSIZE 1024 //chunked downloads use fixed-size chunks (which I somewhat regret, but too late now I guess, really ought to use ranges.).
549
550//these flags are sent as part of the svc_precache index, for any-time precaches. using the upper two bits means we still have 16k available models/sounds/etc
551#define PC_TYPE 0xc000
552#define PC_MODEL 0x0000
553#define PC_SOUND 0x8000
554#define PC_PARTICLE 0x4000
555#define PC_UNUSED 0xc000
556
557#define GAME_COOP 0
558#define GAME_DEATHMATCH 1
559
560
561// playerinfo flags from server
562// playerinfo always sends: playernum, flags, origin[] and framenumber
563
564#define PF_MSEC (1<<0) //msecs says how long the player command was sitting on the server before it was sent back to the client
565#define PF_COMMAND (1<<1) //angles and movement values for other players (no msec or impulse)
566#define PF_VELOCITY1 (1<<2)
567#define PF_VELOCITY2 (1<<3)
568#define PF_VELOCITY3 (1<<4)
569#define PF_MODEL (1<<5)
570#define PF_SKINNUM (1<<6)
571#define PF_EFFECTS (1<<7)
572#define PF_WEAPONFRAME (1<<8) // only sent for view player
573#define PF_DEAD (1<<9) // don't block movement any more
574#define PF_GIB (1<<10) // offset the view height differently
575
576//ZQuake.
577#define PF_PMC_SHIFT 11
578#define PF_PMC_MASK ((1<<11) | \
579 (1<<12) | \
580 (1<<13))
581#ifdef PEXT_HULLSIZE
582#define PF_HULLSIZE_Z (1<<14)
583#endif
584#define PF_EXTRA_PFS (1<<15)
585
586#ifdef PEXT_SCALE
587#define PF_SCALE (1<<16)
588#endif
589#ifdef PEXT_TRANS
590#define PF_TRANS (1<<17)
591#endif
592#ifdef PEXT_FATNESS
593#define PF_FATNESS (1<<18)
594#endif
595
596#define PF_COLOURMOD (1<<19)
597//#define PF_UNUSED (1<<20) //remember to faff with zext
598//#define PF_UNUSED (1<<21) //remember to faff with zext
599//note that if you add any more, you may need to change the check in the client so more can be parsed
600#define PF_ONGROUND (1<<22) //or 14, depending on extensions... messy.
601#define PF_SOLID (1<<23) //or 15, depending on extensions... messy.
602
603
604//not networked
605#define PF_INWATER (1u<<31) //for network smartjump.
606
607
608
609// player move types
610#define PMC_NORMAL 0 // normal ground movement
611#define PMC_NORMAL_JUMP_HELD 1 // normal ground novement + jump_held
612#define PMC_OLD_SPECTATOR 2 // fly through walls (QW compatibility mode)
613#define PMC_SPECTATOR 3 // fly through walls
614#define PMC_FLY 4 // fly, bump into walls
615#define PMC_NONE 5 // can't move (client had better lerp the origin...)
616#define PMC_FREEZE 6 // TODO: lerp movement and viewangles
617#define PMC_WALLWALK 7 // future extension
618
619//any more will require a different protocol message.
620
621//==============================================
622
623// if the high bit of the client to server qbyte is set, the low bits are
624// client move cmd bits
625// ms and angle2 are always sent, the others are optional
626#define CM_ANGLE1 (1<<0)
627#define CM_ANGLE3 (1<<1)
628#define CM_FORWARD (1<<2)
629#define CM_SIDE (1<<3)
630#define CM_UP (1<<4)
631#define CM_BUTTONS (1<<5)
632#define CM_IMPULSE (1<<6)
633#define CM_ANGLE2 (1<<7)
634
635//sigh...
636#define Q2CM_ANGLE1 (1<<0)
637#define Q2CM_ANGLE2 (1<<1)
638#define Q2CM_ANGLE3 (1<<2)
639#define Q2CM_FORWARD (1<<3)
640#define Q2CM_SIDE (1<<4)
641#define Q2CM_UP (1<<5)
642#define Q2CM_BUTTONS (1<<6)
643#define Q2CM_IMPULSE (1<<7)
644
645#define R1Q2_BUTTON_BYTE_FORWARD 4
646#define R1Q2_BUTTON_BYTE_SIDE 8
647#define R1Q2_BUTTON_BYTE_UP 16
648#define R1Q2_BUTTON_BYTE_ANGLE1 32
649#define R1Q2_BUTTON_BYTE_ANGLE2 64
650
651//==============================================
652
653// the first 16 bits of a packetentities update holds 9 bits
654// of entity number and 7 bits of flags
655#define U_UNUSABLE (1<<8)
656#define U_ORIGIN1 (1<<9)
657#define U_ORIGIN2 (1<<10)
658#define U_ORIGIN3 (1<<11)
659#define U_ANGLE2 (1<<12)
660#define U_FRAME (1<<13)
661#define U_REMOVE (1<<14) // REMOVE this entity, don't add it
662#define U_MOREBITS (1<<15)
663
664// if MOREBITS is set, these additional flags are read in next
665#define U_ANGLE1 (1<<0)
666#define U_ANGLE3 (1<<1)
667#define U_MODEL (1<<2)
668#define U_COLORMAP (1<<3)
669#define U_SKIN (1<<4)
670#define U_EFFECTS (1<<5)
671#define U_SOLID (1<<6) // the entity should be solid for prediction
672#ifdef PROTOCOLEXTENSIONS
673#define U_EVENMORE (1<<7) //extension info follows
674
675//fte extensions
676//EVENMORE flags
677#ifdef PEXT_SCALE
678#define U_SCALE (1<<0) //scaler of alias models
679#endif
680#ifdef PEXT_TRANS
681#define U_TRANS (1<<1) //transparency value
682#endif
683#ifdef PEXT_FATNESS
684#define U_FATNESS (1<<2) //qbyte describing how fat an alias model should be. (moves verticies along normals). Useful for vacuum chambers...
685#endif
686#ifdef PEXT_MODELDBL
687#define U_MODELDBL (1<<3) //extra bit for modelindexes
688#endif
689#define U_UNUSED1 (1<<4)
690//FIXME: IMPLEMENT
691#ifdef PEXT_ENTITYDBL
692#define U_ENTITYDBL (1<<5) //use an extra qbyte for origin parts, cos one of them is off
693#endif
694#ifdef PEXT_ENTITYDBL2
695#define U_ENTITYDBL2 (1<<6) //use an extra qbyte for origin parts, cos one of them is off
696#endif
697#define U_YETMORE (1<<7) //even more extension info stuff.
698
699#define U_DRAWFLAGS (1<<8) //use an extra qbyte for origin parts, cos one of them is off
700#define U_ABSLIGHT (1<<9) //Force a lightlevel
701
702#define U_COLOURMOD (1<<10) //rgb
703
704#define U_DPFLAGS (1<<11)
705
706
707#define U_TAGINFO (1<<12)
708#define U_LIGHT (1<<13)
709#define U_EFFECTS16 (1<<14)
710
711#define U_FARMORE (1<<15)
712
713#endif
714
715//FTE Replacement Deltas
716//first byte contains the stuff that's most likely to change constantly
717#define UF_FRAME (1u<<0)
718#define UF_ORIGINXY (1u<<1)
719#define UF_ORIGINZ (1u<<2)
720#define UF_ANGLESXZ (1u<<3)
721#define UF_ANGLESY (1u<<4)
722#define UF_EFFECTS (1u<<5)
723#define UF_PREDINFO (1u<<6) /*ent is predicted, probably a player*/
724#define UF_EXTEND1 (1u<<7)
725
726/*stuff which is common on ent spawning*/
727#define UF_RESET (1u<<8) /*client will reset entire strict to its baseline*/
728#define UF_16BIT_LERPTIME (1u<<9) /*either included frame/skin/model is 16bit (not part of the deltaing itself), or there's nextthink info*/
729#define UF_MODEL (1u<<10)
730#define UF_SKIN (1u<<11)
731#define UF_COLORMAP (1u<<12)
732#define UF_SOLID (1u<<13)
733#define UF_FLAGS (1u<<14)
734#define UF_EXTEND2 (1u<<15)
735
736/*the rest is optional extensions*/
737#define UF_ALPHA (1u<<16)
738#define UF_SCALE (1u<<17)
739#define UF_BONEDATA (1u<<18)
740#define UF_DRAWFLAGS (1u<<19)
741#define UF_TAGINFO (1u<<20)
742#define UF_LIGHT (1u<<21)
743#define UF_TRAILEFFECT (1u<<22)
744#define UF_EXTEND3 (1u<<23)
745
746#define UF_COLORMOD (1u<<24)
747#define UF_GLOW (1u<<25)
748#define UF_FATNESS (1u<<26)
749#define UF_MODELINDEX2 (1u<<27)
750#define UF_GRAVITYDIR (1u<<28)
751#define UF_EFFECTS2_OLD (1u<<29) /*specified >8bit effects, replaced with variable length*/
752#define UF_UNUSED1 (1u<<30)
753#define UF_EXTEND4 (1u<<31)
754
755/*these flags are generally not deltaed as they're changing constantly*/
756#define UFP_FORWARD (1u<<0)
757#define UFP_SIDE (1u<<1)
758#define UFP_UP (1u<<2)
759#define UFP_MOVETYPE (1u<<3) /*deltaed*/
760#define UFP_VELOCITYXY (1u<<4)
761#define UFP_VELOCITYZ (1u<<5)
762#define UFP_MSEC (1u<<6)
763#define UFP_WEAPONFRAME_OLD (1u<<7) //no longer used. just a stat now that I rewrote stat deltas.
764#define UFP_VIEWANGLE (1u<<7)
765
766#define UF_SV_REMOVE UF_16BIT_LERPTIME /*special flag - lerptime isn't delta tracked serverside (reset sent as required with other fields)*/
767
768
769
770#ifdef NQPROT
771//NQ svc_clientdata stat updates.
772#define SU_VIEWHEIGHT (1<<0)
773#define SU_IDEALPITCH (1<<1)
774#define SU_PUNCH1 (1<<2)
775#define SU_PUNCH2 (1<<3)
776#define SU_PUNCH3 (1<<4)
777#define SU_VELOCITY1 (1<<5)
778#define SU_VELOCITY2 (1<<6)
779#define SU_VELOCITY3 (1<<7)
780//define SU_AIMENT (1<<8) AVAILABLE BIT
781#define SU_ITEMS (1<<9)
782#define SU_ONGROUND (1<<10) // no data follows, the bit is it
783#define SU_INWATER (1<<11) // no data follows, the bit is it
784#define SU_WEAPONFRAME (1<<12)
785#define SU_ARMOR (1<<13)
786#define SU_WEAPONMODEL (1<<14)
787#define SU_EXTEND1 (1<<15)
788
789#define FITZSU_WEAPONMODEL2 (1<<16) // 1 byte, this is .weaponmodel & 0xFF00 (second byte)
790#define FITZSU_ARMOR2 (1<<17) // 1 byte, this is .armorvalue & 0xFF00 (second byte)
791#define FITZSU_AMMO2 (1<<18) // 1 byte, this is .currentammo & 0xFF00 (second byte)
792#define FITZSU_SHELLS2 (1<<19) // 1 byte, this is .ammo_shells & 0xFF00 (second byte)
793#define FITZSU_NAILS2 (1<<20) // 1 byte, this is .ammo_nails & 0xFF00 (second byte)
794#define FITZSU_ROCKETS2 (1<<21) // 1 byte, this is .ammo_rockets & 0xFF00 (second byte)
795#define FITZSU_CELLS2 (1<<22) // 1 byte, this is .ammo_cells & 0xFF00 (second byte)
796#define SU_EXTEND2 (1<<23) // another byte to follow
797
798#define FITZSU_WEAPONFRAME2 (1<<24) // 1 byte, this is .weaponframe & 0xFF00 (second byte)
799#define FITZSU_WEAPONALPHA (1<<25) // 1 byte, this is alpha for weaponmodel, uses ENTALPHA_ENCODE, not sent if ENTALPHA_DEFAULT
800#define FITZSU_UNUSED26 (1<<26)
801#define FITZSU_UNUSED27 (1<<27)
802#define FITZSU_UNUSED28 (1<<28)
803#define FITZSU_UNUSED29 (1<<29)
804#define FITZSU_UNUSED30 (1<<30)
805#define SU_EXTEND3 (1<<31) // another byte to follow, future expansion
806
807//builds on top of fitz
808#define QEX_SU_FLOATCOORDS (1<<8)
809#define QEX_SU_ENTFLAGS (1<<26) // ULEB128 copy of the player's .flags field
810
811// first extend byte
812#define DPSU_PUNCHVEC1 (1<<16)
813#define DPSU_PUNCHVEC2 (1<<17)
814#define DPSU_PUNCHVEC3 (1<<18)
815#define DPSU_VIEWZOOM (1<<19) // byte factor (0 = 0.0 (not valid), 255 = 1.0)
816#define DPSU_UNUSED20 (1<<20)
817#define DPSU_UNUSED21 (1<<21)
818#define DPSU_UNUSED22 (1<<22)
819// second extend byte
820#define DPSU_UNUSED24 (1<<24)
821#define DPSU_UNUSED25 (1<<25)
822#define DPSU_UNUSED26 (1<<26)
823#define DPSU_UNUSED27 (1<<27)
824#define DPSU_UNUSED28 (1<<28)
825#define DPSU_UNUSED29 (1<<29)
826#define DPSU_UNUSED30 (1<<30)
827
828
829
830//NQ fast updates
831#define NQU_MOREBITS (1<<0)
832#define NQU_ORIGIN1 (1<<1)
833#define NQU_ORIGIN2 (1<<2)
834#define NQU_ORIGIN3 (1<<3)
835#define NQU_ANGLE2 (1<<4)
836#define NQU_NOLERP (1<<5) // don't interpolate movement
837#define NQU_FRAME (1<<6)
838#define NQU_SIGNAL (1<<7) // just differentiates from other updates
839
840// svc_update can pass all of the fast update bits, plus more
841#define NQU_ANGLE1 (1<<8)
842#define NQU_ANGLE3 (1<<9)
843#define NQU_MODEL (1<<10)
844#define NQU_COLORMAP (1<<11)
845#define NQU_SKIN (1<<12)
846#define NQU_EFFECTS (1<<13)
847#define NQU_LONGENTITY (1<<14)
848
849
850// LordHavoc's: protocol extension
851#define DPU_EXTEND1 (1<<15)
852// LordHavoc: first extend byte
853#define DPU_DELTA (1<<16) // no data, while this is set the entity is delta compressed (uses previous frame as a baseline, meaning only things that have changed from the previous frame are sent, except for the forced full update every half second)
854#define DPU_ALPHA (1<<17) // 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 1, and the entity is not sent if <=0 unless it has effects (model effects are checked as well)
855#define DPU_SCALE (1<<18) // 1 byte, scale / 16 positive, not sent if 1.0
856#define DPU_EFFECTS2 (1<<19) // 1 byte, this is .effects & 0xFF00 (second byte)
857#define DPU_GLOWSIZE (1<<20) // 1 byte, encoding is float/4.0, unsigned, not sent if 0
858#define DPU_GLOWCOLOR (1<<21) // 1 byte, palette index, default is 254 (white), this IS used for darklight (allowing colored darklight), however the particles from a darklight are always black, not sent if default value (even if glowsize or glowtrail is set)
859// LordHavoc: colormod feature has been removed, because no one used it
860#define DPU_COLORMOD (1<<22) // 1 byte, 3 bit red, 3 bit green, 2 bit blue, this lets you tint an object artifically, so you could make a red rocket, or a blue fiend...
861#define DPU_EXTEND2 (1<<23) // another byte to follow
862// LordHavoc: second extend byte
863#define DPU_GLOWTRAIL (1<<24) // leaves a trail of particles (of color .glowcolor, or black if it is a negative glowsize)
864#define DPU_VIEWMODEL (1<<25) // attachs the model to the view (origin and angles become relative to it), only shown to owner, a more powerful alternative to .weaponmodel and such
865#define DPU_FRAME2 (1<<26) // 1 byte, this is .frame & 0xFF00 (second byte)
866#define DPU_MODEL2 (1<<27) // 1 byte, this is .modelindex & 0xFF00 (second byte)
867#define DPU_EXTERIORMODEL (1<<28) // causes this model to not be drawn when using a first person view (third person will draw it, first person will not)
868#define DPU_UNUSED29 (1<<29) // future expansion
869#define DPU_UNUSED30 (1<<30) // future expansion
870#define DPU_EXTEND3 (1<<31) // another byte to follow, future expansion
871
872#define FITZU_ALPHA (1<<16)
873#define FITZU_FRAME2 (1<<17)
874#define FITZU_MODEL2 (1<<18)
875#define FITZU_LERPFINISH (1<<19)
876#define RMQU_SCALE (1<<20)
877
878#define QE_U_FLOATCOORDS (1<<21) //set on the local player entity, to boost precision for prediction.
879#define QE_U_SOLIDTYPE (1<<22) //for prediction I suppose.
880//#define QE_U_EXTEND (1<<23)
881#define QE_U_ENTFLAGS (1<<24) //not sure why this needs to be networked, oh well. redundant with clientdata
882#define QE_U_HEALTH (1<<25) //not sure why this needs to be networked, oh well.
883#define QE_U_UNKNOWN26 (1<<26) //seems to be some sort of nodraw flag (presumably for solid bmodels that need a modelindex for collisions).
884#define QE_U_UNUSED27 (1<<27)
885#define QE_U_UNUSED28 (1<<28)
886#define QE_U_UNUSED29 (1<<29)
887#define QE_U_UNUSED30 (1<<30)
888#define QE_U_UNUSED31 (1u<<31)
889
890#endif
891
892
893
894#define Q2U_ORIGIN1 (1<<0)
895#define Q2U_ORIGIN2 (1<<1)
896#define Q2U_ANGLE2 (1<<2)
897#define Q2U_ANGLE3 (1<<3)
898#define Q2U_FRAME8 (1<<4) // frame is a qbyte
899#define Q2U_EVENT (1<<5)
900#define Q2U_REMOVE (1<<6) // REMOVE this entity, don't add it
901#define Q2U_MOREBITS1 (1<<7) // read one additional qbyte
902
903// second qbyte
904#define Q2U_NUMBER16 (1<<8) // NUMBER8 is implicit if not set
905#define Q2U_ORIGIN3 (1<<9)
906#define Q2U_ANGLE1 (1<<10)
907#define Q2U_MODEL (1<<11)
908#define Q2U_RENDERFX8 (1<<12) // fullbright, etc
909#define Q2UX_ANGLE16 (1<<13)
910#define Q2U_EFFECTS8 (1<<14) // autorotate, trails, etc
911#define Q2U_MOREBITS2 (1<<15) // read one additional qbyte
912
913// third qbyte
914#define Q2U_SKIN8 (1<<16)
915#define Q2U_FRAME16 (1<<17) // frame is a short
916#define Q2U_RENDERFX16 (1<<18) // 8 + 16 = 32
917#define Q2U_EFFECTS16 (1<<19) // 8 + 16 = 32
918#define Q2U_MODEL2 (1<<20) // weapons, flags, etc
919#define Q2U_MODEL3 (1<<21)
920#define Q2U_MODEL4 (1<<22)
921#define Q2U_MOREBITS3 (1<<23) // read one additional qbyte
922
923// fourth qbyte
924#define Q2U_OLDORIGIN (1<<24) // FIXME: get rid of this
925#define Q2U_SKIN16 (1<<25)
926#define Q2U_SOUND (1<<26)
927#define Q2U_SOLID (1<<27)
928#define Q2UX_INDEX16 (1<<28) //model or sound is 16bit
929#define Q2UX_UNUSED3 (1<<29)
930#define Q2UX_UNUSED2 (1<<30)
931#define Q2UX_UNUSED1 (1<<31)
932
933#define Q2UX_UNUSED (Q2UX_UNUSED1|Q2UX_UNUSED2|Q2UX_UNUSED3|Q2UX_UNUSED4)
934
935//QuakeEx-specific stuff
936//gamevar info
937#define QEX_GV_DEATHMATCH (1<<0)
938#define QEX_GV_IDEALPITCHSCALE (1<<1)
939#define QEX_GV_FRICTION (1<<2)
940#define QEX_GV_EDGEFRICTION (1<<3)
941#define QEX_GV_STOPSPEED (1<<4)
942#define QEX_GV_MAXVELOCITY (1<<5)
943#define QEX_GV_GRAVITY (1<<6)
944#define QEX_GV_NOSTEP (1<<7)
945#define QEX_GV_MAXSPEED (1<<8)
946#define QEX_GV_ACCELERATE (1<<9)
947#define QEX_GV_CONTROLLERONLY (1<<10)
948#define QEX_GV_TIMELIMIT (1<<11)
949#define QEX_GV_FRAGLIMIT (1<<12)
950#define QEX_GV_TEAMPLAY (1<<13)
951#define QEX_GV_ALL ((1<<14)-1)
952
953//==============================================
954//obsolete demo players info
955#define DF_ORIGINX (1u<<0)
956#define DF_ORIGINY (1u<<1)
957#define DF_ORIGINZ (1u<<2)
958#define DF_ORIGINALL (DF_ORIGINX|DF_ORIGINY|DF_ORIGINZ)
959#define DF_ANGLEX (1u<<3)
960#define DF_ANGLEY (1u<<4)
961#define DF_ANGLEZ (1u<<5)
962#define DF_ANGLESALL (DF_ANGLEX|DF_ANGLEY|DF_ANGLEZ)
963#define DF_EFFECTS (1u<<6)
964#define DF_SKINNUM (1u<<7)
965#define DF_DEAD (1u<<8)
966#define DF_GIB (1u<<9)
967#define DF_WEAPONFRAME (1u<<10)
968#define DF_MODEL (1u<<11)
969#define DF_RESET (DF_ORIGINALL|DF_ANGLESALL|DF_EFFECTS|DF_SKINNUM|DF_WEAPONFRAME|DF_MODEL)
970
971//==============================================
972
973// a sound with no channel is a local only sound
974// the sound field has bits 0-2: channel, 3-12: entity, 13: unused, 14-15: flags
975#define QWSND_VOLUME (1<<15) // a qbyte
976#define QWSND_ATTENUATION (1<<14) // a qbyte
977
978#define NQSND_VOLUME (1<<0) // a qbyte
979#define NQSND_ATTENUATION (1<<1) // a qbyte
980//#define DPSND_LOOPING (1<<2) // a long, supposedly
981#define FTESND_MOREFLAGS (1<<2) // actually, chan flags, mostly.
982#define NQSND_LARGEENTITY (1<<3) //both dp+fitz
983#define NQSND_LARGESOUND (1<<4) //both dp+fitz
984#define DPSND_SPEEDUSHORT4000 (1<<5) // ushort speed*4000 (speed is usually 1.0, a value of 0.0 is the same as 1.0)
985#define FTESND_TIMEOFS (1<<6) //signed short, in milliseconds.
986#define FTESND_PITCHADJ (1<<7) //a byte (speed percent (0=100%))
987//more flags are weird.
988#define FTESND_VELOCITY (CF_NET_SENTVELOCITY<<8) //borrowed.
989//FTESND_NOSPACIALISE (CF_NOSPACIALISE<<8)
990//FTESND_NOREVERB (CF_NOREVERB<<8)
991//FTESND_FORCELOOP (CF_FORCELOOP<<8)
992//FTESND_FOLLOW (CF_FOLLOW<<8)
993//FTESND_RESERVED (CF_RESERVEDN<<8)
994
995#define DEFAULT_SOUND_PACKET_VOLUME 255
996#define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
997
998//baseline flags
999#define FITZ_B_LARGEMODEL (1<<0)
1000#define FITZ_B_LARGEFRAME (1<<1)
1001#define FITZ_B_ALPHA (1<<2)
1002#define RMQFITZ_B_SCALE (1<<3)
1003
1004#define QEX_B_SOLID (1<<3)
1005#define QEX_B_UNKNOWN4 (1<<4)
1006#define QEX_B_UNKNOWN5 (1<<5)
1007#define QEX_B_UNKNOWN6 (1<<6)
1008#define QEX_B_UNKNOWN7 (1<<7)
1009
1010#define DEFAULT_VIEWHEIGHT 22
1011
1012
1013// svc_print messages have an id, so messages can be filtered
1014#define PRINT_LOW 0
1015#define PRINT_MEDIUM 1
1016#define PRINT_HIGH 2
1017#define PRINT_CHAT 3 // also go to chat buffer
1018
1019//
1020// temp entity events
1021//
1022enum {
1025 TEQW_QWGUNSHOT = 2, //qw has count byte, nq does not
1026 TENQ_NQGUNSHOT = 2, //nq has no count byte
1027 TEQW_QWEXPLOSION = 3, //remapped to TEQW_EXPLOSIONNOSPRITE for nq.
1028 TENQ_NQEXPLOSION = 3, //remapped to TEQW_EXPLOSIONNOSPRITE for nq.
1037
1038 TEQW_QWBLOOD = 12, //implemented as a particle() in nq
1039 TENQ_EXPLOSION2 = 12, //remapped to TEQW_EXPLOSION2 for qw
1040 TEQW_LIGHTNINGBLOOD = 13, //implemented as a particle() in nq
1041 TENQ_BEAM = 13, //remapped to TEQW_BEAM for qw
1042
1043#ifdef PEXT_TE_BULLET
1046#endif
1047 TENQ_RAILTRAIL = 15, //gah [vector] origin [coord] red [coord] green [coord] blue
1048 TE_EXPLOSION3_NEH = 16, //gah [vector] origin [coord] red [coord] green [coord] blue
1049 TEQW_RAILTRAIL = 17, //use the builtin, luke.
1050 TENQ_NEHLIGHTNING4 = 17, //gah [string] model [entity] entity [vector] start [vector] end
1051 TEQW_NEHLIGHTNING4 = 1000, //give a real value if its ever properly implemented
1052 TEQW_BEAM = 18, //use the builtin, luke.
1053 TENQ_NEHSMOKE = 18, //gah [vector] origin [byte] palette
1054 TEQW_EXPLOSION2 = 19, //use the builtin, luke.
1055 TEQW_NQEXPLOSION = 20, //nq-style explosion over qw
1056 TENQ_QWEXPLOSION = 20, //qw-style explosion over nq
1057 TEQW_NQGUNSHOT = 21, //nq has count byte, qw does not
1058 TENQ_QWGUNSHOT = 21, //nq has count byte, qw does not
1059
1060 // hexen 2
1071
1072 TEDP_BLOOD = 50, // [coord*3] origin [byte*3] vel [byte] count
1077 TEDP_PARTICLERAIN = 55, // [vector] min [vector] max [vector] dir [short] count [byte] color
1078 TEDP_PARTICLESNOW = 56, // [vector] min [vector] max [vector] dir [short] count [byte] color
1079 TEDP_GUNSHOTQUAD = 57, // [vector] origin
1080 TEDP_SPIKEQUAD = 58, // [vector] origin
1081 TEDP_SUPERSPIKEQUAD = 59, // [vector] origin
1082 TEDP_EXPLOSIONQUAD = 70, // [vector] origin
1083 TEDP_SMALLFLASH = 72, // [vector] origin
1091};
1092
1093
1094#define CTE_CUSTOMCOUNT 1
1095#define CTE_CUSTOMDIRECTION 2
1096#define CTE_STAINS 4
1097#define CTE_GLOWS 8
1098#define CTE_CHANNELFADE 16
1099#define CTE_CUSTOMVELOCITY 32
1100#define CTE_PERSISTANT 64
1101#define CTE_ISBEAM 128
1102//CTE_ISBEAM && (CTE_CUSTOMVELOCITY||CTE_CUSTOMDIRECTION) = BOX particles.
1103
1104//FTE's version of TEI_SHOWLMP2. tei's values and coding scheme which makes no sense to anyone but him.
1105#define SL_ORG_NW 0
1106#define SL_ORG_NE 1
1107#define SL_ORG_SW 2
1108#define SL_ORG_SE 3
1109#define SL_ORG_CC 4
1110#define SL_ORG_CN 5
1111#define SL_ORG_CS 6
1112#define SL_ORG_CW 7
1113#define SL_ORG_CE 8
1114
1115//relative coding where offsets are predictable
1116#define SL_ORG_TL 20
1117#define SL_ORG_TR 21
1118#define SL_ORG_BL 22
1119#define SL_ORG_BR 23
1120#define SL_ORG_MM 24
1121#define SL_ORG_TM 25
1122#define SL_ORG_BM 26
1123#define SL_ORG_ML 27
1124#define SL_ORG_MR 28
1125
1126/*
1127==========================================================
1128
1129 ELEMENTS COMMUNICATED ACROSS THE NET
1130
1131==========================================================
1132*/
1133
1134#define MAX_CLIENTS 255 /*max 255, min 32*/
1135#define QWMAX_CLIENTS 32 /*QW's standard max. clients might have issues above this value*/
1136#define NQMAX_CLIENTS 16 /*NQ's standard max. clients might have issues above this value*/
1137
1138#define UPDATE_BACKUP 64 // copies of entity_state_t to keep buffered
1139 // must be power of two
1140#define UPDATE_MASK (UPDATE_BACKUP-1)
1141
1142#define Q2UPDATE_BACKUP 16 // copies of entity_state_t to keep buffered
1143 // must be power of two
1144#define Q2UPDATE_MASK (Q2UPDATE_BACKUP-1)
1145
1146#define Q3UPDATE_BACKUP 32 // copies of entity_state_t to keep buffered
1147 // must be power of two
1148#define Q3UPDATE_MASK (Q3UPDATE_BACKUP-1)
1149
1150
1151// entity_state_t is the information conveyed from the server
1152// in an update message
1153
1154typedef struct entity_state_s
1155{
1156 unsigned int number; // edict index
1157 unsigned int sequence;
1158
1159 unsigned short modelindex;
1161 qbyte bonecount; //for networked bones
1162 unsigned int boneoffset; //offset into the frame (not a pointer, to avoid issues with reallocing extra storage)
1163
1164// unsigned int eflags; // nolerp, etc
1165
1166 unsigned int effects;
1167
1170 union
1171 {
1172#if defined(Q2CLIENT) || defined(Q2SERVER)
1173 struct
1174 {
1175 int renderfx; //q2
1177
1178 unsigned short modelindex3; //q2
1179 unsigned short modelindex4; //q2
1180 unsigned short sound; //q2
1183#endif
1184 struct
1185 {
1186 /*info to predict other players, so I don't get yelled at if fte were to stop supporting it*/
1187 qbyte pmovetype; //&128 means onground.
1189 short vangle[3];
1190
1191 short movement[3];
1192 short velocity[3]; // 1/8th
1193
1194 unsigned short weaponframe;
1195 unsigned char gravitydir[2]; //pitch/yaw, no roll
1196
1197 unsigned short traileffectnum;
1198 unsigned short emiteffectnum;
1199
1202 } u;
1203
1204 unsigned short modelindex2; //q2/vweps
1205 unsigned short frame;
1206
1207 unsigned short baseframe;
1210
1211 unsigned int skinnum; /*for q2 this often contains rgba*/
1212
1213 unsigned short colormap;
1216
1217 qbyte scale; //4.4 precision
1221
1223 qbyte colormod[3];//3.5 precision
1224
1225 qbyte glowmod[3]; //3.5 precision
1226 qbyte trans; //254==1, 255==1-or-wateralpha
1227
1228 unsigned short light[4];
1229
1230 float lerpend; //fitz rubbish
1231
1234 unsigned short tagindex; //~0 == weird portal thing.
1235
1236 unsigned int tagentity;
1237
1238 unsigned int solidsize;
1239#define ES_SOLID_NOT 0
1240#define ES_SOLID_BSP 31
1241#define ES_SOLID_HULL1 0x80201810
1242#define ES_SOLID_HULL2 0x80401820
1243#define ES_SOLID_HAS_EXTRA_BITS(solid) ((solid&0x0707) || (((solid>>16)-32768+32) & 7))
1246
1247
1248#define MAX_EXTENDED_PACKET_ENTITIES 256 //sanity limit.
1249#define MAX_STANDARD_PACKET_ENTITIES 64 // doesn't count nails
1250#define MAX_MVDPACKET_ENTITIES 196 // doesn't count nails
1251typedef struct
1252{
1257 int fixangles[MAX_SPLITS]; //these should not be in here
1258 vec3_t fixedangles[MAX_SPLITS];
1259 vec3_t punchangle[MAX_SPLITS];
1260 vec3_t punchorigin[MAX_SPLITS];
1261
1266
1268{
1269 unsigned int status;
1270#define VRSTATUS_ORG (1u<<0)
1271#define VRSTATUS_ANG (1u<<1)
1272#define VRSTATUS_VEL (1u<<2)
1273#define VRSTATUS_AVEL (1u<<3)
1274 short angles[3];
1275 short avelocity[3];
1278 unsigned int weapon;
1279#define VRDEV_LEFT 0
1280#define VRDEV_RIGHT 1
1281#define VRDEV_HEAD 2
1282#define VRDEV_COUNT 3
1283};
1284typedef struct usercmd_s
1285{
1286 short angles[3];
1288 unsigned int impulse;
1289 unsigned int lightlevel;
1290
1291 unsigned int sequence; // just for debugging prints
1292 float msec; //replace msec, but with more precision
1293 unsigned int buttons; //replaces buttons, but with more bits.
1294 unsigned int weapon;//q3 has a separate weapon field to supplement impulse.
1295 unsigned int servertime; //q3 networks the time in order to calculate msecs
1296 double fservertime;//used as part of nq msec calcs
1297 double fclienttime;//not used?
1298
1299 //prydon cursor crap
1304
1305 //vr things
1306 struct vrdevinfo_s vr[VRDEV_COUNT]; //left, right, head.
1308
1309typedef struct q2usercmd_s
1310{ //visible to gamecode so can't be changed (and the prediction code)
1313 short angles[3];
1318
1319typedef struct q1usercmd_s
1320{ //as written to qwd demos so can't be changed.
1327#define SHORT2ANGLE(x) (x) * (360.0/65536)
1328#define ANGLE2SHORT(x) (x) * (65536/360.0)
1329
1330
1331
1332
1333//
1334// per-level limits
1335//
1336#define Q2MAX_CLIENTS 256 // absolute limit
1337#define Q2MAX_EDICTS 1024 // must change protocol to increase more
1338#define Q2MAX_LIGHTSTYLES 256
1339#define Q2MAX_MODELS 256 // these are sent over the net as bytes
1340#define Q2MAX_SOUNDS 256 // so they cannot be blindly increased
1341#define Q2MAX_IMAGES 256
1342#define Q2MAX_ITEMS 256
1343#define Q2MAX_GENERAL (Q2MAX_CLIENTS*2) // general config strings
1344
1345
1346#define Q2CS_NAME 0
1347#define Q2CS_CDTRACK 1
1348#define Q2CS_SKY 2
1349#define Q2CS_SKYAXIS 3 // %f %f %f format
1350#define Q2CS_SKYROTATE 4
1351#define Q2CS_STATUSBAR 5 // display program string
1352
1353#define Q2CS_AIRACCEL 29 // air acceleration control
1354#define Q2CS_MAXCLIENTS 30
1355#define Q2CS_MAPCHECKSUM 31 // for catching cheater maps
1356
1357#define Q2CS_MODELS 32
1358#define Q2CS_SOUNDS (Q2CS_MODELS +Q2MAX_MODELS)
1359#define Q2CS_IMAGES (Q2CS_SOUNDS +Q2MAX_SOUNDS)
1360#define Q2CS_LIGHTS (Q2CS_IMAGES +Q2MAX_IMAGES)
1361#define Q2CS_ITEMS (Q2CS_LIGHTS +Q2MAX_LIGHTSTYLES)
1362#define Q2CS_PLAYERSKINS (Q2CS_ITEMS +Q2MAX_ITEMS)
1363#define Q2CS_GENERAL (Q2CS_PLAYERSKINS +Q2MAX_CLIENTS)
1364#define Q2MAX_CONFIGSTRINGS (Q2CS_GENERAL +Q2MAX_GENERAL)
1365
1366
1367// player_state->stats[] indexes
1368#define Q2STAT_HEALTH_ICON 0
1369#define Q2STAT_HEALTH 1
1370#define Q2STAT_AMMO_ICON 2
1371#define Q2STAT_AMMO 3
1372#define Q2STAT_ARMOR_ICON 4
1373#define Q2STAT_ARMOR 5
1374#define Q2STAT_SELECTED_ICON 6
1375#define Q2STAT_PICKUP_ICON 7
1376#define Q2STAT_PICKUP_STRING 8
1377#define Q2STAT_TIMER_ICON 9
1378#define Q2STAT_TIMER 10
1379#define Q2STAT_HELPICON 11
1380#define Q2STAT_SELECTED_ITEM 12
1381#define Q2STAT_LAYOUTS 13
1382#define Q2STAT_FRAGS 14
1383#define Q2STAT_FLASHES 15 // cleared each frame, 1 = health, 2 = armor
1384#define Q2STAT_CHASE 16
1385#define Q2STAT_SPECTATOR 17
1386
1387#define Q2MAX_STATS 32
1388
1389
1390//for the local player
1391#define Q2PS_M_TYPE (1<<0)
1392#define Q2PS_M_ORIGIN (1<<1)
1393#define Q2PS_M_VELOCITY (1<<2)
1394#define Q2PS_M_TIME (1<<3)
1395#define Q2PS_M_FLAGS (1<<4)
1396#define Q2PS_M_GRAVITY (1<<5)
1397#define Q2PS_M_DELTA_ANGLES (1<<6)
1398#define Q2PS_VIEWOFFSET (1<<7)
1399#define Q2PS_VIEWANGLES (1<<8)
1400#define Q2PS_KICKANGLES (1<<9)
1401#define Q2PS_BLEND (1<<10)
1402#define Q2PS_FOV (1<<11)
1403#define Q2PS_WEAPONINDEX (1<<12)
1404#define Q2PS_WEAPONFRAME (1<<13)
1405#define Q2PS_RDFLAGS (1<<14)
1406#define Q2PS_EXTRABITS (1<<15)
1407#define Q2PS_INDEX16 (1<<16)
1408#define Q2PS_CLIENTNUM (1<<17)
1409#define Q2PS_UNUSED6 (1<<18)
1410#define Q2PS_UNUSED5 (1<<19)
1411#define Q2PS_UNUSED4 (1<<20)
1412#define Q2PS_UNUSED3 (1<<21)
1413#define Q2PS_UNUSED2 (1<<22)
1414#define Q2PS_UNUSED1 (1<<23)
1415
1416#define Q2PSX_GUNOFFSET (1<<0)
1417#define Q2PSX_GUNANGLES (1<<1)
1418#define Q2PSX_M_VELOCITY2 (1<<2)
1419#define Q2PSX_M_ORIGIN2 (1<<3)
1420#define Q2PSX_VIEWANGLE2 (1<<4)
1421#define Q2PSX_STATS (1<<5)
1422#define Q2PSX_CLIENTNUM (1<<6)
1423#define Q2PSX_OLD (1<<8) //not part of the protocol, just lazy handling.
1424
1425
1426// entity_state_t->renderfx flags
1427#define Q2RF_MINLIGHT (1u<<0) //ni always have some light (viewmodel)
1428#define RF_EXTERNALMODEL (1u<<1) //i don't draw through eyes, only mirrors
1429#define RF_WEAPONMODEL (1u<<2) //i only draw through eyes
1430#define RF_FULLBRIGHT (1u<<3) //i always draw full intensity
1431#define RF_DEPTHHACK (1u<<4) //i for view weapon Z crunching
1432#define RF_TRANSLUCENT (1u<<5) //forces shader sort order and BEF_FORCETRANSPARENT
1433#define Q2RF_FRAMELERP (1u<<6) //q2only
1434#define Q2RF_BEAM (1u<<7) //mostly q2only
1435
1436#define Q2RF_CUSTOMSKIN (1u<<8) //not even in q2 skin is an index in image_precache
1437#define Q2RF_GLOW (1u<<9) //i pulse lighting for bonus items
1438#define Q2RF_SHELL_RED (1u<<10) //q2only
1439#define Q2RF_SHELL_GREEN (1u<<11) //q2only
1440#define Q2RF_SHELL_BLUE (1u<<12) //q2only
1441
1442//ROGUE
1443#define Q2RF_IR_VISIBLE (1u<<15) // shows red with Q2RDF_IRGOGGLES
1444#define Q2RF_SHELL_DOUBLE (1u<<16) //q2only
1445#define Q2RF_SHELL_HALF_DAM (1u<<17) //q2only
1446#define Q2RF_USE_DISGUISE (1u<<18) //ni entity is displayed with skin 'players/$MODEL/disguise.pcx' instead
1447//ROGUE
1448
1449#define RF_ADDITIVE (1u<<19) //forces shader sort order and BEF_FORCEADDITIVE
1450#define RF_NOSHADOW (1u<<20) //disables shadow casting
1451#define RF_NODEPTHTEST (1u<<21) //forces shader sort order and BEF_FORCENODEPTH
1452#define RF_FORCECOLOURMOD (1u<<22) //forces BEF_FORCECOLOURMOD
1453#define RF_WEAPONMODELNOBOB (1u<<23)
1454#define RF_FIRSTPERSON (1u<<24) //only draw through eyes
1455#define RF_XFLIP (1u<<25) //flip horizontally (for q2's left-handed weapons)
1456
1457// player_state_t->refdef flags
1458#define RDF_UNDERWATER (1u<<0) // warp the screen as apropriate (fov trick)
1459#define RDF_NOWORLDMODEL (1u<<1) // used for player configuration screen
1460//ROGUE
1461#define Q2RDF_IRGOGGLES (1u<<2) //ents with Q2RF_IR_VISIBLE show up pure red.
1462#define Q2RDF_UVGOGGLES (1u<<3) //usused / reserved
1463//ROGUE
1464
1465#define RDF_BLOOM (1u<<16)
1466#define RDF_FISHEYE (1u<<17)
1467#define RDF_WATERWARP (1u<<18)
1468#define RDF_CUSTOMPOSTPROC (1u<<19)
1469#define RDF_ANTIALIAS (1u<<20) //fxaa, or possibly even just fsaa
1470#define RDF_RENDERSCALE (1u<<21)
1471#define RDF_SCENEGAMMA (1u<<22)
1472#define RDF_DISABLEPARTICLES (1u<<23) //mostly for skyrooms
1473#define RDF_SKIPSKY (1u<<24) //we drew a skyroom, skip drawing sky chains for this scene.
1474#define RDF_SKYROOMENABLED (1u<<25) //skyroom position is known, be prepared to draw the skyroom if its visible.
1475
1476#define RDF_ALLPOSTPROC (RDF_BLOOM|RDF_FISHEYE|RDF_WATERWARP|RDF_CUSTOMPOSTPROC|RDF_ANTIALIAS|RDF_SCENEGAMMA) //these flags require rendering to an fbo for the various different post-processing shaders.
1477
1478
1479
1480
1481
1482#define Q2SND_VOLUME (1u<<0) // a qbyte
1483#define Q2SND_ATTENUATION (1u<<1) // a qbyte
1484#define Q2SND_POS (1u<<2) // three coordinates
1485#define Q2SND_ENT (1u<<3) // a short 0-2: channel, 3-12: entity
1486#define Q2SND_OFFSET (1u<<4) // a qbyte, msec offset from frame start
1487#define Q2SND_LARGEIDX (1u<<5) // idx is a short
1488#define Q2SND_LARGEPOS (1u<<6) // float coord
1489#define Q2SND_EXTRABITS (1u<<7) // unused for now, reserved.
1490
1491#define Q2DEFAULT_SOUND_PACKET_VOLUME 1.0
1492#define Q2DEFAULT_SOUND_PACKET_ATTENUATION 1.0
1493
1494
1495#define ATTN_NONE 0
1496#define ATTN_NORM 1
1497#define CHAN_AUTO 0
1498#define CHAN_WEAPON 1
1499#define CHAN_VOICE 2
1500#define CHAN_ITEM 3
1501#define CHAN_BODY 4
1502
1503#define Q2MZ_BLASTER 0
1504#define Q2MZ_MACHINEGUN 1
1505#define Q2MZ_SHOTGUN 2
1506#define Q2MZ_CHAINGUN1 3
1507#define Q2MZ_CHAINGUN2 4
1508#define Q2MZ_CHAINGUN3 5
1509#define Q2MZ_RAILGUN 6
1510#define Q2MZ_ROCKET 7
1511#define Q2MZ_GRENADE 8
1512#define Q2MZ_LOGIN 9
1513#define Q2MZ_LOGOUT 10
1514#define Q2MZ_RESPAWN 11
1515#define Q2MZ_BFG 12
1516#define Q2MZ_SSHOTGUN 13
1517#define Q2MZ_HYPERBLASTER 14
1518#define Q2MZ_ITEMRESPAWN 15
1519// RAFAEL
1520#define Q2MZ_IONRIPPER 16
1521#define Q2MZ_BLUEHYPERBLASTER 17
1522#define Q2MZ_PHALANX 18
1523#define Q2MZ_SILENCED 128 // bit flag ORed with one of the above numbers
1524
1525//ROGUE
1526#define Q2MZ_ETF_RIFLE 30
1527#define Q2MZ_UNUSED 31
1528#define Q2MZ_SHOTGUN2 32
1529#define Q2MZ_HEATBEAM 33
1530#define Q2MZ_BLASTER2 34
1531#define Q2MZ_TRACKER 35
1532#define Q2MZ_NUKE1 36
1533#define Q2MZ_NUKE2 37
1534#define Q2MZ_NUKE4 38
1535#define Q2MZ_NUKE8 39
1536//ROGUE
1537
1538//
1539// monster muzzle flashes
1540//
1541#define Q2MZ2_TANK_BLASTER_1 1
1542#define Q2MZ2_TANK_BLASTER_2 2
1543#define Q2MZ2_TANK_BLASTER_3 3
1544#define Q2MZ2_TANK_MACHINEGUN_1 4
1545#define Q2MZ2_TANK_MACHINEGUN_2 5
1546#define Q2MZ2_TANK_MACHINEGUN_3 6
1547#define Q2MZ2_TANK_MACHINEGUN_4 7
1548#define Q2MZ2_TANK_MACHINEGUN_5 8
1549#define Q2MZ2_TANK_MACHINEGUN_6 9
1550#define Q2MZ2_TANK_MACHINEGUN_7 10
1551#define Q2MZ2_TANK_MACHINEGUN_8 11
1552#define Q2MZ2_TANK_MACHINEGUN_9 12
1553#define Q2MZ2_TANK_MACHINEGUN_10 13
1554#define Q2MZ2_TANK_MACHINEGUN_11 14
1555#define Q2MZ2_TANK_MACHINEGUN_12 15
1556#define Q2MZ2_TANK_MACHINEGUN_13 16
1557#define Q2MZ2_TANK_MACHINEGUN_14 17
1558#define Q2MZ2_TANK_MACHINEGUN_15 18
1559#define Q2MZ2_TANK_MACHINEGUN_16 19
1560#define Q2MZ2_TANK_MACHINEGUN_17 20
1561#define Q2MZ2_TANK_MACHINEGUN_18 21
1562#define Q2MZ2_TANK_MACHINEGUN_19 22
1563#define Q2MZ2_TANK_ROCKET_1 23
1564#define Q2MZ2_TANK_ROCKET_2 24
1565#define Q2MZ2_TANK_ROCKET_3 25
1566
1567#define Q2MZ2_INFANTRY_MACHINEGUN_1 26
1568#define Q2MZ2_INFANTRY_MACHINEGUN_2 27
1569#define Q2MZ2_INFANTRY_MACHINEGUN_3 28
1570#define Q2MZ2_INFANTRY_MACHINEGUN_4 29
1571#define Q2MZ2_INFANTRY_MACHINEGUN_5 30
1572#define Q2MZ2_INFANTRY_MACHINEGUN_6 31
1573#define Q2MZ2_INFANTRY_MACHINEGUN_7 32
1574#define Q2MZ2_INFANTRY_MACHINEGUN_8 33
1575#define Q2MZ2_INFANTRY_MACHINEGUN_9 34
1576#define Q2MZ2_INFANTRY_MACHINEGUN_10 35
1577#define Q2MZ2_INFANTRY_MACHINEGUN_11 36
1578#define Q2MZ2_INFANTRY_MACHINEGUN_12 37
1579#define Q2MZ2_INFANTRY_MACHINEGUN_13 38
1580
1581#define Q2MZ2_SOLDIER_BLASTER_1 39
1582#define Q2MZ2_SOLDIER_BLASTER_2 40
1583#define Q2MZ2_SOLDIER_SHOTGUN_1 41
1584#define Q2MZ2_SOLDIER_SHOTGUN_2 42
1585#define Q2MZ2_SOLDIER_MACHINEGUN_1 43
1586#define Q2MZ2_SOLDIER_MACHINEGUN_2 44
1587
1588#define Q2MZ2_GUNNER_MACHINEGUN_1 45
1589#define Q2MZ2_GUNNER_MACHINEGUN_2 46
1590#define Q2MZ2_GUNNER_MACHINEGUN_3 47
1591#define Q2MZ2_GUNNER_MACHINEGUN_4 48
1592#define Q2MZ2_GUNNER_MACHINEGUN_5 49
1593#define Q2MZ2_GUNNER_MACHINEGUN_6 50
1594#define Q2MZ2_GUNNER_MACHINEGUN_7 51
1595#define Q2MZ2_GUNNER_MACHINEGUN_8 52
1596#define Q2MZ2_GUNNER_GRENADE_1 53
1597#define Q2MZ2_GUNNER_GRENADE_2 54
1598#define Q2MZ2_GUNNER_GRENADE_3 55
1599#define Q2MZ2_GUNNER_GRENADE_4 56
1600
1601#define Q2MZ2_CHICK_ROCKET_1 57
1602
1603#define Q2MZ2_FLYER_BLASTER_1 58
1604#define Q2MZ2_FLYER_BLASTER_2 59
1605
1606#define Q2MZ2_MEDIC_BLASTER_1 60
1607
1608#define Q2MZ2_GLADIATOR_RAILGUN_1 61
1609
1610#define Q2MZ2_HOVER_BLASTER_1 62
1611
1612#define Q2MZ2_ACTOR_MACHINEGUN_1 63
1613
1614#define Q2MZ2_SUPERTANK_MACHINEGUN_1 64
1615#define Q2MZ2_SUPERTANK_MACHINEGUN_2 65
1616#define Q2MZ2_SUPERTANK_MACHINEGUN_3 66
1617#define Q2MZ2_SUPERTANK_MACHINEGUN_4 67
1618#define Q2MZ2_SUPERTANK_MACHINEGUN_5 68
1619#define Q2MZ2_SUPERTANK_MACHINEGUN_6 69
1620#define Q2MZ2_SUPERTANK_ROCKET_1 70
1621#define Q2MZ2_SUPERTANK_ROCKET_2 71
1622#define Q2MZ2_SUPERTANK_ROCKET_3 72
1623
1624#define Q2MZ2_BOSS2_MACHINEGUN_L1 73
1625#define Q2MZ2_BOSS2_MACHINEGUN_L2 74
1626#define Q2MZ2_BOSS2_MACHINEGUN_L3 75
1627#define Q2MZ2_BOSS2_MACHINEGUN_L4 76
1628#define Q2MZ2_BOSS2_MACHINEGUN_L5 77
1629#define Q2MZ2_BOSS2_ROCKET_1 78
1630#define Q2MZ2_BOSS2_ROCKET_2 79
1631#define Q2MZ2_BOSS2_ROCKET_3 80
1632#define Q2MZ2_BOSS2_ROCKET_4 81
1633
1634#define Q2MZ2_FLOAT_BLASTER_1 82
1635
1636#define Q2MZ2_SOLDIER_BLASTER_3 83
1637#define Q2MZ2_SOLDIER_SHOTGUN_3 84
1638#define Q2MZ2_SOLDIER_MACHINEGUN_3 85
1639#define Q2MZ2_SOLDIER_BLASTER_4 86
1640#define Q2MZ2_SOLDIER_SHOTGUN_4 87
1641#define Q2MZ2_SOLDIER_MACHINEGUN_4 88
1642#define Q2MZ2_SOLDIER_BLASTER_5 89
1643#define Q2MZ2_SOLDIER_SHOTGUN_5 90
1644#define Q2MZ2_SOLDIER_MACHINEGUN_5 91
1645#define Q2MZ2_SOLDIER_BLASTER_6 92
1646#define Q2MZ2_SOLDIER_SHOTGUN_6 93
1647#define Q2MZ2_SOLDIER_MACHINEGUN_6 94
1648#define Q2MZ2_SOLDIER_BLASTER_7 95
1649#define Q2MZ2_SOLDIER_SHOTGUN_7 96
1650#define Q2MZ2_SOLDIER_MACHINEGUN_7 97
1651#define Q2MZ2_SOLDIER_BLASTER_8 98
1652#define Q2MZ2_SOLDIER_SHOTGUN_8 99
1653#define Q2MZ2_SOLDIER_MACHINEGUN_8 100
1654
1655// --- Xian shit below ---
1656#define Q2MZ2_MAKRON_BFG 101
1657#define Q2MZ2_MAKRON_BLASTER_1 102
1658#define Q2MZ2_MAKRON_BLASTER_2 103
1659#define Q2MZ2_MAKRON_BLASTER_3 104
1660#define Q2MZ2_MAKRON_BLASTER_4 105
1661#define Q2MZ2_MAKRON_BLASTER_5 106
1662#define Q2MZ2_MAKRON_BLASTER_6 107
1663#define Q2MZ2_MAKRON_BLASTER_7 108
1664#define Q2MZ2_MAKRON_BLASTER_8 109
1665#define Q2MZ2_MAKRON_BLASTER_9 110
1666#define Q2MZ2_MAKRON_BLASTER_10 111
1667#define Q2MZ2_MAKRON_BLASTER_11 112
1668#define Q2MZ2_MAKRON_BLASTER_12 113
1669#define Q2MZ2_MAKRON_BLASTER_13 114
1670#define Q2MZ2_MAKRON_BLASTER_14 115
1671#define Q2MZ2_MAKRON_BLASTER_15 116
1672#define Q2MZ2_MAKRON_BLASTER_16 117
1673#define Q2MZ2_MAKRON_BLASTER_17 118
1674#define Q2MZ2_MAKRON_RAILGUN_1 119
1675#define Q2MZ2_JORG_MACHINEGUN_L1 120
1676#define Q2MZ2_JORG_MACHINEGUN_L2 121
1677#define Q2MZ2_JORG_MACHINEGUN_L3 122
1678#define Q2MZ2_JORG_MACHINEGUN_L4 123
1679#define Q2MZ2_JORG_MACHINEGUN_L5 124
1680#define Q2MZ2_JORG_MACHINEGUN_L6 125
1681#define Q2MZ2_JORG_MACHINEGUN_R1 126
1682#define Q2MZ2_JORG_MACHINEGUN_R2 127
1683#define Q2MZ2_JORG_MACHINEGUN_R3 128
1684#define Q2MZ2_JORG_MACHINEGUN_R4 129
1685#define Q2MZ2_JORG_MACHINEGUN_R5 130
1686#define Q2MZ2_JORG_MACHINEGUN_R6 131
1687#define Q2MZ2_JORG_BFG_1 132
1688#define Q2MZ2_BOSS2_MACHINEGUN_R1 133
1689#define Q2MZ2_BOSS2_MACHINEGUN_R2 134
1690#define Q2MZ2_BOSS2_MACHINEGUN_R3 135
1691#define Q2MZ2_BOSS2_MACHINEGUN_R4 136
1692#define Q2MZ2_BOSS2_MACHINEGUN_R5 137
1693
1694//ROGUE
1695#define Q2MZ2_CARRIER_MACHINEGUN_L1 138
1696#define Q2MZ2_CARRIER_MACHINEGUN_R1 139
1697#define Q2MZ2_CARRIER_GRENADE 140
1698#define Q2MZ2_TURRET_MACHINEGUN 141
1699#define Q2MZ2_TURRET_ROCKET 142
1700#define Q2MZ2_TURRET_BLASTER 143
1701#define Q2MZ2_STALKER_BLASTER 144
1702#define Q2MZ2_DAEDALUS_BLASTER 145
1703#define Q2MZ2_MEDIC_BLASTER_2 146
1704#define Q2MZ2_CARRIER_RAILGUN 147
1705#define Q2MZ2_WIDOW_DISRUPTOR 148
1706#define Q2MZ2_WIDOW_BLASTER 149
1707#define Q2MZ2_WIDOW_RAIL 150
1708#define Q2MZ2_WIDOW_PLASMABEAM 151 // PMM - not used
1709#define Q2MZ2_CARRIER_MACHINEGUN_L2 152
1710#define Q2MZ2_CARRIER_MACHINEGUN_R2 153
1711#define Q2MZ2_WIDOW_RAIL_LEFT 154
1712#define Q2MZ2_WIDOW_RAIL_RIGHT 155
1713#define Q2MZ2_WIDOW_BLASTER_SWEEP1 156
1714#define Q2MZ2_WIDOW_BLASTER_SWEEP2 157
1715#define Q2MZ2_WIDOW_BLASTER_SWEEP3 158
1716#define Q2MZ2_WIDOW_BLASTER_SWEEP4 159
1717#define Q2MZ2_WIDOW_BLASTER_SWEEP5 160
1718#define Q2MZ2_WIDOW_BLASTER_SWEEP6 161
1719#define Q2MZ2_WIDOW_BLASTER_SWEEP7 162
1720#define Q2MZ2_WIDOW_BLASTER_SWEEP8 163
1721#define Q2MZ2_WIDOW_BLASTER_SWEEP9 164
1722#define Q2MZ2_WIDOW_BLASTER_100 165
1723#define Q2MZ2_WIDOW_BLASTER_90 166
1724#define Q2MZ2_WIDOW_BLASTER_80 167
1725#define Q2MZ2_WIDOW_BLASTER_70 168
1726#define Q2MZ2_WIDOW_BLASTER_60 169
1727#define Q2MZ2_WIDOW_BLASTER_50 170
1728#define Q2MZ2_WIDOW_BLASTER_40 171
1729#define Q2MZ2_WIDOW_BLASTER_30 172
1730#define Q2MZ2_WIDOW_BLASTER_20 173
1731#define Q2MZ2_WIDOW_BLASTER_10 174
1732#define Q2MZ2_WIDOW_BLASTER_0 175
1733#define Q2MZ2_WIDOW_BLASTER_10L 176
1734#define Q2MZ2_WIDOW_BLASTER_20L 177
1735#define Q2MZ2_WIDOW_BLASTER_30L 178
1736#define Q2MZ2_WIDOW_BLASTER_40L 179
1737#define Q2MZ2_WIDOW_BLASTER_50L 180
1738#define Q2MZ2_WIDOW_BLASTER_60L 181
1739#define Q2MZ2_WIDOW_BLASTER_70L 182
1740#define Q2MZ2_WIDOW_RUN_1 183
1741#define Q2MZ2_WIDOW_RUN_2 184
1742#define Q2MZ2_WIDOW_RUN_3 185
1743#define Q2MZ2_WIDOW_RUN_4 186
1744#define Q2MZ2_WIDOW_RUN_5 187
1745#define Q2MZ2_WIDOW_RUN_6 188
1746#define Q2MZ2_WIDOW_RUN_7 189
1747#define Q2MZ2_WIDOW_RUN_8 190
1748#define Q2MZ2_CARRIER_ROCKET_1 191
1749#define Q2MZ2_CARRIER_ROCKET_2 192
1750#define Q2MZ2_CARRIER_ROCKET_3 193
1751#define Q2MZ2_CARRIER_ROCKET_4 194
1752#define Q2MZ2_WIDOW2_BEAMER_1 195
1753#define Q2MZ2_WIDOW2_BEAMER_2 196
1754#define Q2MZ2_WIDOW2_BEAMER_3 197
1755#define Q2MZ2_WIDOW2_BEAMER_4 198
1756#define Q2MZ2_WIDOW2_BEAMER_5 199
1757#define Q2MZ2_WIDOW2_BEAM_SWEEP_1 200
1758#define Q2MZ2_WIDOW2_BEAM_SWEEP_2 201
1759#define Q2MZ2_WIDOW2_BEAM_SWEEP_3 202
1760#define Q2MZ2_WIDOW2_BEAM_SWEEP_4 203
1761#define Q2MZ2_WIDOW2_BEAM_SWEEP_5 204
1762#define Q2MZ2_WIDOW2_BEAM_SWEEP_6 205
1763#define Q2MZ2_WIDOW2_BEAM_SWEEP_7 206
1764#define Q2MZ2_WIDOW2_BEAM_SWEEP_8 207
1765#define Q2MZ2_WIDOW2_BEAM_SWEEP_9 208
1766#define Q2MZ2_WIDOW2_BEAM_SWEEP_10 209
1767#define Q2MZ2_WIDOW2_BEAM_SWEEP_11 210
1768
1769
1770
1771
1772
1773
1774#define MAX_MAP_AREA_BYTES 32
1775
1776// edict->drawflags (hexen2 stuff)
1777#define MLS_MASK 7 // Model Light Style
1778#define MLS_NONE 0
1779#define MLS_FULLBRIGHT 1
1780#define MLS_POWERMODE 2
1781#define MLS_TORCH 3
1782#define MLS_TOTALDARK 4
1783#define MLS_UNUSED 4
1784#define MLS_ADDLIGHT 6
1785#define MLS_ABSLIGHT (MLS_MASK)
1786#define SCALE_TYPE_MASK (SCALE_TYPE_UNIFORM|SCALE_TYPE_XYONLY|SCALE_TYPE_ZONLY)
1787#define SCALE_TYPE_UNIFORM 0 // Scale X, Y, and Z
1788#define SCALE_TYPE_XYONLY 8 // Scale X and Y
1789#define SCALE_TYPE_ZONLY 16 // Scale Z
1790#define SCALE_TYPE_UNUSED (SCALE_TYPE_XYONLY|SCALE_TYPE_ZONLY)
1791#define SCALE_ORIGIN_MASK (SCALE_ORIGIN_TOP|SCALE_ORIGIN_BOTTOM|SCALE_ORIGIN_CENTER)
1792#define SCALE_ORIGIN_CENTER 0 // Scaling origin at object center
1793#define SCALE_ORIGIN_BOTTOM 32 // Scaling origin at object bottom
1794#define SCALE_ORIGIN_TOP 64 // Scaling origin at object top
1795#define SCALE_ORIGIN_ORIGIN (SCALE_ORIGIN_TOP|SCALE_ORIGIN_BOTTOM) // Scaling origin at object origin
1796#define DRF_TRANSLUCENT 128
1797
1798
1799//TENEBRAE_GFX_DLIGHTS
1800#define PFLAGS_NOSHADOW 1
1801#define PFLAGS_CORONA 2
1802#define PFLAGS_FULLDYNAMIC 128 //NOTE: this is a dp-ism. for tenebrae compat, this should be effects&16 and not pflags&128, as effects&16 already means something else
1803
1804#define RENDER_STEP 1
1805#define RENDER_GLOWTRAIL 2
1806#define RENDER_VIEWMODEL 4
1807#define RENDER_EXTERIORMODEL 8
1808#define RENDER_LOWPRECISION 16 // send as low precision coordinates to save bandwidth
1809#define RENDER_COLORMAPPED 32
1810//#define RENDER_WORLDOBJECT 64
1811#define RENDER_COMPLEXANIMATION 128
1812
1813//darkplaces protocols 5 to 7 use these
1814// reset all entity fields (typically used if status changed)
1815#define E5_FULLUPDATE (1<<0)
1816// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
1817// E5_ORIGIN32=1: float[3] = s->origin[0], s->origin[1], s->origin[2]
1818#define E5_ORIGIN (1<<1)
1819// E5_ANGLES16=0: byte[3] = s->angle[0] * 256 / 360, s->angle[1] * 256 / 360, s->angle[2] * 256 / 360
1820// E5_ANGLES16=1: short[3] = s->angle[0] * 65536 / 360, s->angle[1] * 65536 / 360, s->angle[2] * 65536 / 360
1821#define E5_ANGLES (1<<2)
1822// E5_MODEL16=0: byte = s->modelindex
1823// E5_MODEL16=1: short = s->modelindex
1824#define E5_MODEL (1<<3)
1825// E5_FRAME16=0: byte = s->frame
1826// E5_FRAME16=1: short = s->frame
1827#define E5_FRAME (1<<4)
1828// byte = s->skin
1829#define E5_SKIN (1<<5)
1830// E5_EFFECTS16=0 && E5_EFFECTS32=0: byte = s->effects
1831// E5_EFFECTS16=1 && E5_EFFECTS32=0: short = s->effects
1832// E5_EFFECTS16=0 && E5_EFFECTS32=1: int = s->effects
1833// E5_EFFECTS16=1 && E5_EFFECTS32=1: int = s->effects
1834#define E5_EFFECTS (1<<6)
1835// bits >= (1<<8)
1836#define E5_EXTEND1 (1<<7)
1837
1838// byte = s->renderflags
1839#define E5_FLAGS (1<<8)
1840// byte = bound(0, s->alpha * 255, 255)
1841#define E5_ALPHA (1<<9)
1842// byte = bound(0, s->scale * 16, 255)
1843#define E5_SCALE (1<<10)
1844// flag
1845#define E5_ORIGIN32 (1<<11)
1846// flag
1847#define E5_ANGLES16 (1<<12)
1848// flag
1849#define E5_MODEL16 (1<<13)
1850// byte = s->colormap
1851#define E5_COLORMAP (1<<14)
1852// bits >= (1<<16)
1853#define E5_EXTEND2 (1<<15)
1854
1855// short = s->tagentity
1856// byte = s->tagindex
1857#define E5_ATTACHMENT (1<<16)
1858// short[4] = s->light[0], s->light[1], s->light[2], s->light[3]
1859// byte = s->lightstyle
1860// byte = s->lightpflags
1861#define E5_LIGHT (1<<17)
1862// byte = s->glowsize
1863// byte = s->glowcolor
1864#define E5_GLOW (1<<18)
1865// short = s->effects
1866#define E5_EFFECTS16 (1<<19)
1867// int = s->effects
1868#define E5_EFFECTS32 (1<<20)
1869// flag
1870#define E5_FRAME16 (1<<21)
1871// unused
1872#define E5_COLORMOD (1<<22)
1873// bits >= (1<<24)
1874#define E5_EXTEND3 (1<<23)
1875
1876// unused
1877#define E5_GLOWMOD (1<<24)
1878// unused
1879#define E5_COMPLEXANIMATION (1<<25)
1880// unused
1881#define E5_TRAILEFFECTNUM (1<<26)
1882// unused
1883#define E5_UNUSED27 (1<<27)
1884// unused
1885#define E5_UNUSED28 (1<<28)
1886// unused
1887#define E5_UNUSED29 (1<<29)
1888// unused
1889#define E5_UNUSED30 (1<<30)
1890// bits2 > 0
1891#define E5_EXTEND4 (1u<<31)
1892
1893#define E5_ALLUNUSED (E5_UNUSED27|E5_UNUSED28|E5_UNUSED29|E5_UNUSED30)
1894#define E5_SERVERPRIVATE (E5_EXTEND1|E5_EXTEND2|E5_EXTEND3|E5_EXTEND4)
1895#define E5_SERVERREMOVE E5_EXTEND1
vec_t vec3_t[3]
Definition: api_menu.h:40
vec_t vec2_t[2]
Definition: api_menu.h:39
unsigned char qbyte
Definition: common.h:127
struct q2usercmd_s q2usercmd_t
struct q1usercmd_s q1usercmd_t
entity_state_t nullentitystate
Definition: common.c:61
struct usercmd_s usercmd_t
@ TEDP_GUNSHOTQUAD
Definition: protocol.h:1079
@ TE_BULLET
Definition: protocol.h:1044
@ TEDP_PARTICLERAIN
Definition: protocol.h:1077
@ TEDP_SUPERSPIKEQUAD
Definition: protocol.h:1081
@ TEH2_STREAM_LIGHTNING
Definition: protocol.h:1065
@ TEQW_SUPERBULLET
Definition: protocol.h:1045
@ TEDP_PARTICLESNOW
Definition: protocol.h:1078
@ TEDP_FLAMEJET
Definition: protocol.h:1085
@ TEQW_RAILTRAIL
Definition: protocol.h:1049
@ TEH2_STREAM_GAZE
Definition: protocol.h:1068
@ TE_SPIKE
Definition: protocol.h:1023
@ TE_WIZSPIKE
Definition: protocol.h:1032
@ TENQ_NQGUNSHOT
Definition: protocol.h:1026
@ TEDP_EXPLOSIONRGB
Definition: protocol.h:1075
@ TE_LAVASPLASH
Definition: protocol.h:1035
@ TEDP_CUSTOMFLASH
Definition: protocol.h:1084
@ TENQ_RAILTRAIL
Definition: protocol.h:1047
@ TEQW_NEHLIGHTNING4
Definition: protocol.h:1051
@ TE_LIGHTNING2
Definition: protocol.h:1031
@ TE_LIGHTNING3
Definition: protocol.h:1034
@ TEDP_PLASMABURN
Definition: protocol.h:1086
@ TEQW_BEAM
Definition: protocol.h:1052
@ TEQW_QWGUNSHOT
Definition: protocol.h:1025
@ TEDP_TEI_PLASMAHIT
Definition: protocol.h:1090
@ TE_KNIGHTSPIKE
Definition: protocol.h:1033
@ TENQ_BEAM
Definition: protocol.h:1041
@ TE_LIGHTNING1
Definition: protocol.h:1030
@ TEQW_QWEXPLOSION
Definition: protocol.h:1027
@ TEDP_BLOODSHOWER
Definition: protocol.h:1074
@ TENQ_QWEXPLOSION
Definition: protocol.h:1056
@ TEDP_SPARK
Definition: protocol.h:1073
@ TEH2_PARTICLEEXPLOSION
Definition: protocol.h:1070
@ TEQW_EXPLOSION2
Definition: protocol.h:1054
@ TEQW_LIGHTNINGBLOOD
Definition: protocol.h:1040
@ TEH2_STREAM_SUNSTAFF2
Definition: protocol.h:1064
@ TEQW_QWBLOOD
Definition: protocol.h:1038
@ TEQW_NQEXPLOSION
Definition: protocol.h:1055
@ TENQ_EXPLOSION2
Definition: protocol.h:1039
@ TEH2_STREAM_COLORBEAM
Definition: protocol.h:1066
@ TENQ_NEHLIGHTNING4
Definition: protocol.h:1050
@ TENQ_QWGUNSHOT
Definition: protocol.h:1058
@ TEH2_STREAM_ICECHUNKS
Definition: protocol.h:1067
@ TE_SUPERSPIKE
Definition: protocol.h:1024
@ TEH2_STREAM_LIGHTNING_SMALL
Definition: protocol.h:1061
@ TEH2_STREAM_SUNSTAFF1
Definition: protocol.h:1063
@ TEDP_TEI_BIGEXPLOSION
Definition: protocol.h:1089
@ TEDP_TEI_G3
Definition: protocol.h:1087
@ TEDP_SMALLFLASH
Definition: protocol.h:1083
@ TE_TELEPORT
Definition: protocol.h:1036
@ TEH2_STREAM_CHAIN
Definition: protocol.h:1062
@ TEDP_SMOKE
Definition: protocol.h:1088
@ TEDP_SPIKEQUAD
Definition: protocol.h:1080
@ TEQW_NQGUNSHOT
Definition: protocol.h:1057
@ TE_EXPLOSION3_NEH
Definition: protocol.h:1048
@ TEDP_PARTICLECUBE
Definition: protocol.h:1076
@ TE_TAREXPLOSION
Definition: protocol.h:1029
@ TENQ_NEHSMOKE
Definition: protocol.h:1053
@ TENQ_NQEXPLOSION
Definition: protocol.h:1028
@ TEH2_STREAM_FAMINE
Definition: protocol.h:1069
@ TEDP_EXPLOSIONQUAD
Definition: protocol.h:1082
@ TEDP_BLOOD
Definition: protocol.h:1072
clustercmdops_e
Definition: protocol.h:390
@ ccmd_stuffcmd
Definition: protocol.h:392
@ ccmd_lostplayer
Definition: protocol.h:399
@ ccmd_transferabort
Definition: protocol.h:423
@ ccmd_foundplayer
Definition: protocol.h:401
@ ccmd_serveraddress
Definition: protocol.h:431
@ ccmd_print
Definition: protocol.h:395
@ ccmd_transferplayer
Definition: protocol.h:410
@ ccmd_transferedplayer
Definition: protocol.h:416
@ ccmd_tookplayer
Definition: protocol.h:419
@ ccmd_stringcmd
Definition: protocol.h:434
@ ccmd_bad
Definition: protocol.h:391
@ ccmd_setcvar
Definition: protocol.h:394
@ ccmd_acceptserver
Definition: protocol.h:397
@ ccmd_takeplayer
Definition: protocol.h:405
@ ccmd_saveplayer
Definition: protocol.h:427
@ R1Q2_SVSET_PLAYERUPDATES
Definition: protocol.h:505
@ R1Q2_SVSET_FPS
Definition: protocol.h:506
clcq2_ops_e
Definition: protocol.h:480
@ clcq2_bad
Definition: protocol.h:481
@ clcq2_nop
Definition: protocol.h:482
@ clcq2_stringcmd
Definition: protocol.h:485
@ clcq2_userinfo
Definition: protocol.h:484
@ clcq2_move
Definition: protocol.h:483
@ clcq2_stringcmd_seat
Definition: protocol.h:491
@ clcr1q2_multimoves
Definition: protocol.h:488
@ clcr1q2_setting
Definition: protocol.h:487
@ clcq2_voicechat
Definition: protocol.h:493
struct entity_state_s entity_state_t
svcq2_ops_e
Definition: protocol.h:443
@ svcq2_playerinfo
Definition: protocol.h:465
@ svcq2_frame
Definition: protocol.h:468
@ svcq2_layout
Definition: protocol.h:450
@ svcq2_muzzleflash
Definition: protocol.h:447
@ svcq2pro_setting
Definition: protocol.h:476
@ svcq2_reconnect
Definition: protocol.h:456
@ svcq2_inventory
Definition: protocol.h:451
@ svcr1q2_playerupdate
Definition: protocol.h:473
@ svcq2_muzzleflash2
Definition: protocol.h:448
@ svcq2_nop
Definition: protocol.h:454
@ svcq2_sound
Definition: protocol.h:457
@ svcq2_temp_entity
Definition: protocol.h:449
@ svcq2_bad
Definition: protocol.h:444
@ svcq2pro_gamestate
Definition: protocol.h:475
@ svcq2_download
Definition: protocol.h:464
@ svcq2_deltapacketentities
Definition: protocol.h:467
@ svcq2_spawnbaseline
Definition: protocol.h:462
@ svcq2_print
Definition: protocol.h:458
@ svcq2_centerprint
Definition: protocol.h:463
@ svcq2_configstring
Definition: protocol.h:461
@ svcq2_packetentities
Definition: protocol.h:466
@ svcq2_disconnect
Definition: protocol.h:455
@ svcq2_serverdata
Definition: protocol.h:460
@ svcq2_stufftext
Definition: protocol.h:459
@ svcr1q2_setting
Definition: protocol.h:474
@ svcr1q2_zdownload
Definition: protocol.h:472
@ svcr1q2_zpacket
Definition: protocol.h:471
@ R1Q2_CLSET_RECORDING
Definition: protocol.h:500
@ R1Q2_CLSET_PLAYERUPDATES
Definition: protocol.h:501
@ R1Q2_CLSET_NOGUN
Definition: protocol.h:498
@ R1Q2_CLSET_NOBLEND
Definition: protocol.h:499
@ R1Q2_CLSET_FPS
Definition: protocol.h:502
Definition: protocol.h:1155
qbyte lightstyle
Definition: protocol.h:1232
qbyte dpflags
Definition: protocol.h:1222
qbyte pmovetype
Definition: protocol.h:1187
unsigned short modelindex4
Definition: protocol.h:1179
unsigned short modelindex
Definition: protocol.h:1159
qbyte basebone
Definition: protocol.h:1208
qbyte lightpflags
Definition: protocol.h:1233
unsigned char gravitydir[2]
Definition: protocol.h:1195
unsigned int skinnum
Definition: protocol.h:1211
short velocity[3]
Definition: protocol.h:1192
char fatness
Definition: protocol.h:1218
qbyte inactiveflag
Definition: protocol.h:1160
qbyte glowcolour
Definition: protocol.h:1215
unsigned int solidsize
Definition: protocol.h:1238
vec3_t old_origin
Definition: protocol.h:1176
qbyte pad
Definition: protocol.h:1209
qbyte trans
Definition: protocol.h:1226
qbyte colormod[3]
Definition: protocol.h:1223
struct entity_state_s::@262::@266 q1
qbyte msec
Definition: protocol.h:1188
qbyte hexen2flags
Definition: protocol.h:1219
unsigned short tagindex
Definition: protocol.h:1234
unsigned short modelindex3
Definition: protocol.h:1178
unsigned int effects
Definition: protocol.h:1166
short vangle[3]
Definition: protocol.h:1189
vec3_t predorg
Definition: protocol.h:1200
unsigned int tagentity
Definition: protocol.h:1236
unsigned short baseframe
Definition: protocol.h:1207
qbyte glowsize
Definition: protocol.h:1214
unsigned short modelindex2
Definition: protocol.h:1204
union entity_state_s::@262 u
vec3_t origin
Definition: protocol.h:1168
unsigned int boneoffset
Definition: protocol.h:1162
unsigned int sequence
Definition: protocol.h:1157
vec3_t angles
Definition: protocol.h:1169
unsigned short frame
Definition: protocol.h:1205
unsigned short traileffectnum
Definition: protocol.h:1197
unsigned short emiteffectnum
Definition: protocol.h:1198
qbyte event
Definition: protocol.h:1181
float lerpend
Definition: protocol.h:1230
unsigned short light[4]
Definition: protocol.h:1228
unsigned short sound
Definition: protocol.h:1180
unsigned short colormap
Definition: protocol.h:1213
qbyte scale
Definition: protocol.h:1217
qbyte bonecount
Definition: protocol.h:1161
qbyte glowmod[3]
Definition: protocol.h:1225
struct entity_state_s::@262::@265 q2
qbyte abslight
Definition: protocol.h:1220
unsigned short weaponframe
Definition: protocol.h:1194
unsigned int number
Definition: protocol.h:1156
int renderfx
Definition: protocol.h:1175
short movement[3]
Definition: protocol.h:1191
Definition: protocol.h:1252
int num_entities
Definition: protocol.h:1254
float servertime
Definition: protocol.h:1253
size_t bonedatacur
Definition: protocol.h:1263
int max_entities
Definition: protocol.h:1255
qbyte * bonedata
Definition: protocol.h:1262
size_t bonedatamax
Definition: protocol.h:1264
entity_state_t * entities
Definition: protocol.h:1256
Definition: protocol.h:1320
qbyte buttons
Definition: protocol.h:1324
short sidemove
Definition: protocol.h:1323
short forwardmove
Definition: protocol.h:1323
qbyte impulse
Definition: protocol.h:1325
short upmove
Definition: protocol.h:1323
vec3_t angles
Definition: protocol.h:1322
qbyte msec
Definition: protocol.h:1321
Definition: protocol.h:1310
qbyte msec
Definition: protocol.h:1311
qbyte buttons
Definition: protocol.h:1312
qbyte impulse
Definition: protocol.h:1315
short sidemove
Definition: protocol.h:1314
short forwardmove
Definition: protocol.h:1314
qbyte lightlevel
Definition: protocol.h:1316
short upmove
Definition: protocol.h:1314
short angles[3]
Definition: protocol.h:1313
Definition: protocol.h:1285
vec3_t cursor_start
Definition: protocol.h:1301
unsigned int servertime
Definition: protocol.h:1295
unsigned int lightlevel
Definition: protocol.h:1289
double fclienttime
Definition: protocol.h:1297
signed int forwardmove
Definition: protocol.h:1287
struct vrdevinfo_s vr[VRDEV_COUNT]
Definition: protocol.h:1306
unsigned int sequence
Definition: protocol.h:1291
short angles[3]
Definition: protocol.h:1286
float msec
Definition: protocol.h:1292
unsigned int weapon
Definition: protocol.h:1294
unsigned int impulse
Definition: protocol.h:1288
vec3_t cursor_impact
Definition: protocol.h:1302
unsigned int buttons
Definition: protocol.h:1293
signed int upmove
Definition: protocol.h:1287
signed int sidemove
Definition: protocol.h:1287
unsigned int cursor_entitynumber
Definition: protocol.h:1303
double fservertime
Definition: protocol.h:1296
vec2_t cursor_screen
Definition: protocol.h:1300
Definition: protocol.h:1268
short avelocity[3]
Definition: protocol.h:1275
vec3_t velocity
Definition: protocol.h:1277
unsigned int status
Definition: protocol.h:1269
vec3_t origin
Definition: protocol.h:1276
short angles[3]
Definition: protocol.h:1274
unsigned int weapon
Definition: protocol.h:1278