git-svn-id: http://bladebattles.com/kurok/SVN@11 20cd92bb-ff49-0410-b73e-96a06e42c3b9
[kurok.git] / protocol.h
blobd7832538504c8d5078df9e7ab6d4261fbf716c8f
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 // protocol.h -- communications protocols
22 #define PROTOCOL_VERSION 15
24 // if the high bit of the servercmd is set, the low bits are fast update flags:
25 #define U_MOREBITS (1<<0)
26 #define U_ORIGIN1 (1<<1)
27 #define U_ORIGIN2 (1<<2)
28 #define U_ORIGIN3 (1<<3)
29 #define U_ANGLE2 (1<<4)
30 #define U_NOLERP (1<<5) // don't interpolate movement
31 #define U_FRAME (1<<6)
32 #define U_SIGNAL (1<<7) // just differentiates from other updates
34 // svc_update can pass all of the fast update bits, plus more
35 #define U_ANGLE1 (1<<8)
36 #define U_ANGLE3 (1<<9)
37 #define U_MODEL (1<<10)
38 #define U_COLORMAP (1<<11)
39 #define U_SKIN (1<<12)
40 #define U_EFFECTS (1<<13)
41 #define U_LONGENTITY (1<<14)
43 // Tomaz - QC Alpha Scale Glow Control Begin
45 #define U_EXTEND1 (1<<15)
46 #define U_SCALE (1<<16)
47 #define U_ALPHA (1<<17)
48 #define U_GLOW_SIZE (1<<18)
49 #define U_GLOW_RED (1<<19)
50 #define U_GLOW_GREEN (1<<20)
51 #define U_GLOW_BLUE (1<<21)
53 // Tomaz - QC Alpha Scale Glow Control End
55 #define SU_VIEWHEIGHT (1<<0)
56 #define SU_IDEALPITCH (1<<1)
57 #define SU_PUNCH1 (1<<2)
58 #define SU_PUNCH2 (1<<3)
59 #define SU_PUNCH3 (1<<4)
60 #define SU_VELOCITY1 (1<<5)
61 #define SU_VELOCITY2 (1<<6)
62 #define SU_VELOCITY3 (1<<7)
63 //define SU_AIMENT (1<<8) AVAILABLE BIT
64 #define SU_ITEMS (1<<9)
65 #define SU_ONGROUND (1<<10) // no data follows, the bit is it
66 #define SU_INWATER (1<<11) // no data follows, the bit is it
67 #define SU_WEAPONFRAME (1<<12)
68 #define SU_ARMOR (1<<13)
69 #define SU_WEAPON (1<<14)
71 // a sound with no channel is a local only sound
72 #define SND_VOLUME (1<<0) // a byte
73 #define SND_ATTENUATION (1<<1) // a byte
74 #define SND_LOOPING (1<<2) // a long
77 // defaults for clientinfo messages
78 #define DEFAULT_VIEWHEIGHT 22
81 // game types sent by serverinfo
82 // these determine which intermission screen plays
83 #define GAME_COOP 0
84 #define GAME_DEATHMATCH 1
86 //==================
87 // note that there are some defs.qc that mirror to these numbers
88 // also related to svc_strings[] in cl_parse
89 //==================
92 // server to client
94 #define svc_bad 0
95 #define svc_nop 1
96 #define svc_disconnect 2
97 #define svc_updatestat 3 // [byte] [long]
98 #define svc_version 4 // [long] server version
99 #define svc_setview 5 // [short] entity number
100 #define svc_sound 6 // <see code>
101 #define svc_time 7 // [float] server time
102 #define svc_print 8 // [string] null terminated string
103 #define svc_stufftext 9 // [string] stuffed into client's console buffer
104 // the string should be \n terminated
105 #define svc_setangle 10 // [angle3] set the view angle to this absolute value
107 #define svc_serverinfo 11 // [long] version
108 // [string] signon string
109 // [string]..[0]model cache
110 // [string]...[0]sounds cache
111 #define svc_lightstyle 12 // [byte] [string]
112 #define svc_updatename 13 // [byte] [string]
113 #define svc_updatefrags 14 // [byte] [short]
114 #define svc_clientdata 15 // <shortbits + data>
115 #define svc_stopsound 16 // <see code>
116 #define svc_updatecolors 17 // [byte] [byte]
117 #define svc_particle 18 // [vec3] <variable>
118 #define svc_damage 19
120 #define svc_spawnstatic 20
121 // svc_spawnbinary 21
122 #define svc_spawnbaseline 22
124 #define svc_temp_entity 23
126 #define svc_setpause 24 // [byte] on / off
127 #define svc_signonnum 25 // [byte] used for the signon sequence
129 #define svc_centerprint 26 // [string] to put in center of the screen
131 #define svc_killedmonster 27
132 #define svc_foundsecret 28
134 #define svc_spawnstaticsound 29 // [coord3] [byte] samp [byte] vol [byte] aten
136 #define svc_intermission 30 // [string] music
137 #define svc_finale 31 // [string] music [string] text
139 #define svc_cdtrack 32 // [byte] track [byte] looptrack
140 #define svc_sellscreen 33
142 #define svc_cutscene 34
144 //johnfitz -- new server messages
145 #define svc_skybox 37 // [string] name
146 #define svc_fog 41 // [byte] start [byte] end [byte] red [byte] green [byte] blue [float] time
149 // client to server
151 #define clc_bad 0
152 #define clc_nop 1
153 #define clc_disconnect 2
154 #define clc_move 3 // [usercmd_t]
155 #define clc_stringcmd 4 // [string] message
159 // temp entity events
161 #define TE_SPIKE 0
162 #define TE_SUPERSPIKE 1
163 #define TE_GUNSHOT 2
164 #define TE_EXPLOSION 3
165 #define TE_TAREXPLOSION 4
166 #define TE_LIGHTNING1 5
167 #define TE_LIGHTNING2 6
168 #define TE_WIZSPIKE 7
169 #define TE_KNIGHTSPIKE 8
170 #define TE_LIGHTNING3 9
171 #define TE_LAVASPLASH 10
172 #define TE_TELEPORT 11
173 #define TE_EXPLOSION2 12
175 // PGM 01/21/97
176 #define TE_BEAM 13
177 // PGM 01/21/97
179 #ifdef QUAKE2
180 #define TE_IMPLOSION 14
181 #define TE_RAILTRAIL 15
182 #endif