Parent Directory | Revision Log
Revision 44 - (view) (download)
1 : | ian | 1 | /* Message constants |
2 : | * | ||
3 : | * by the AMX Mod X Development Team | ||
4 : | * | ||
5 : | * This file is provided as is (no warranties). | ||
6 : | * | ||
7 : | */ | ||
8 : | |||
9 : | #if defined _message_const_included | ||
10 : | #endinput | ||
11 : | #endif | ||
12 : | #define _message_const_included | ||
13 : | |||
14 : | /* Destination types for message_begin() */ | ||
15 : | #define MSG_BROADCAST 0 // Unreliable to all | ||
16 : | #define MSG_ONE 1 // Reliable to one (msg_entity) | ||
17 : | #define MSG_ALL 2 // Reliable to all | ||
18 : | #define MSG_INIT 3 // Write to the init string | ||
19 : | #define MSG_PVS 4 // Ents in PVS of org | ||
20 : | #define MSG_PAS 5 // Ents in PAS of org | ||
21 : | #define MSG_PVS_R 6 // Reliable to PVS | ||
22 : | #define MSG_PAS_R 7 // Reliable to PAS | ||
23 : | #define MSG_ONE_UNRELIABLE 8 // Send to one client, but don't put in reliable stream, put in unreliable datagram (could be dropped) | ||
24 : | #define MSG_SPEC 9 // Sends to all spectator proxies | ||
25 : | |||
26 : | ian | 17 | /* Hardcoded message types for message_begin() |
27 : | * Look in the actual HLSDK for details! | ||
28 : | */ | ||
29 : | #define SVC_NOP 1 | ||
30 : | #define SVC_DISCONNECT 2 | ||
31 : | #define SVC_EVENT 3 | ||
32 : | #define SVC_VERSION 4 | ||
33 : | #define SVC_SETVIEW 5 | ||
34 : | #define SVC_SOUND 6 | ||
35 : | #define SVC_TIME 7 | ||
36 : | #define SVC_PRINT 8 | ||
37 : | #define SVC_STUFFTEXT 9 | ||
38 : | #define SVC_SETANGLE 10 | ||
39 : | #define SVC_SERVERINFO 11 | ||
40 : | #define SVC_LIGHTSTYLE 12 | ||
41 : | #define SVC_UPDATEUSERINFO 13 | ||
42 : | #define SVC_DELTADESCRIPTION 14 | ||
43 : | #define SVC_CLIENTDATA 15 | ||
44 : | #define SVC_STOPSOUND 16 | ||
45 : | #define SVC_PINGS 17 | ||
46 : | #define SVC_PARTICLE 18 | ||
47 : | #define SVC_DAMAGE 19 | ||
48 : | #define SVC_SPAWNSTATIC 20 | ||
49 : | #define SVC_EVENT_RELIABLE 21 | ||
50 : | #define SVC_SPAWNBASELINE 22 | ||
51 : | #define SVC_TEMPENTITY 23 | ||
52 : | #define SVC_SETPAUSE 24 | ||
53 : | #define SVC_SIGNONNUM 25 | ||
54 : | #define SVC_CENTERPRINT 26 | ||
55 : | #define SVC_KILLEDMONSTER 27 | ||
56 : | #define SVC_FOUNDSECRET 28 | ||
57 : | #define SVC_SPAWNSTATICSOUND 29 | ||
58 : | #define SVC_INTERMISSION 30 | ||
59 : | #define SVC_FINALE 31 | ||
60 : | #define SVC_CDTRACK 32 | ||
61 : | #define SVC_RESTORE 33 | ||
62 : | #define SVC_CUTSCENE 34 | ||
63 : | #define SVC_WEAPONANIM 35 | ||
64 : | #define SVC_DECALNAME 36 | ||
65 : | #define SVC_ROOMTYPE 37 | ||
66 : | #define SVC_ADDANGLE 38 | ||
67 : | #define SVC_NEWUSERMSG 39 | ||
68 : | #define SVC_PACKETENTITIES 40 | ||
69 : | #define SVC_DELTAPACKETENTITIES 41 | ||
70 : | #define SVC_CHOKE 42 | ||
71 : | #define SVC_RESOURCELIST 43 | ||
72 : | #define SVC_NEWMOVEVARS 44 | ||
73 : | #define SVC_RESOURCEREQUEST 45 | ||
74 : | #define SVC_CUSTOMIZATION 46 | ||
75 : | #define SVC_CROSSHAIRANGLE 47 | ||
76 : | #define SVC_SOUNDFADE 48 | ||
77 : | #define SVC_FILETXFERFAILED 49 | ||
78 : | #define SVC_HLTV 50 | ||
79 : | #define SVC_DIRECTOR 51 | ||
80 : | #define SVC_VOICEINIT 52 | ||
81 : | #define SVC_VOICEDATA 53 | ||
82 : | #define SVC_SENDEXTRAINFO 54 | ||
83 : | #define SVC_TIMESCALE 55 | ||
84 : | ian | 1 | |
85 : | /* Message flags for set_msg_block() */ | ||
86 : | #define BLOCK_NOT 0 | ||
87 : | #define BLOCK_ONCE 1 | ||
88 : | #define BLOCK_SET 2 | ||
89 : | |||
90 : | /* Used with get_msg_argtype() and set_msg_arg_ */ | ||
91 : | enum | ||
92 : | { | ||
93 : | ARG_BYTE = 1, /* int */ | ||
94 : | ARG_CHAR, /* int */ | ||
95 : | ARG_SHORT, /* int */ | ||
96 : | ARG_LONG, /* int */ | ||
97 : | ARG_ANGLE, /* float */ | ||
98 : | ARG_COORD, /* float */ | ||
99 : | ARG_STRING, /* string */ | ||
100 : | ARG_ENTITY, /* int */ | ||
101 : | ian | 17 | }; |
102 : | ian | 1 | |
103 : | /* Temp entity message types for message_begin() */ | ||
104 : | #define TE_BEAMPOINTS 0 // Beam effect between two points | ||
105 : | // write_byte(TE_BEAMPOINTS) | ||
106 : | // write_coord(startposition.x) | ||
107 : | // write_coord(startposition.y) | ||
108 : | // write_coord(startposition.z) | ||
109 : | // write_coord(endposition.x) | ||
110 : | // write_coord(endposition.y) | ||
111 : | // write_coord(endposition.z) | ||
112 : | // write_short(sprite index) | ||
113 : | // write_byte(starting frame) | ||
114 : | // write_byte(frame rate in 0.1's) | ||
115 : | // write_byte(life in 0.1's) | ||
116 : | // write_byte(line width in 0.1's) | ||
117 : | // write_byte(noise amplitude in 0.01's) | ||
118 : | // write_byte(red) | ||
119 : | // write_byte(green) | ||
120 : | // write_byte(blue) | ||
121 : | // write_byte(brightness) | ||
122 : | // write_byte(scroll speed in 0.1's) | ||
123 : | |||
124 : | #define TE_BEAMENTPOINT 1 // Beam effect between point and entity | ||
125 : | // write_byte(TE_BEAMENTPOINT) | ||
126 : | // write_short(start entity) | ||
127 : | // write_coord(endposition.x) | ||
128 : | // write_coord(endposition.y) | ||
129 : | // write_coord(endposition.z) | ||
130 : | // write_short(sprite index) | ||
131 : | // write_byte(starting frame) | ||
132 : | // write_byte(frame rate in 0.1's) | ||
133 : | // write_byte(life in 0.1's) | ||
134 : | // write_byte(line width in 0.1's) | ||
135 : | // write_byte(noise amplitude in 0.01's) | ||
136 : | // write_byte(red) | ||
137 : | // write_byte(green) | ||
138 : | // write_byte(blue) | ||
139 : | // write_byte(brightness) | ||
140 : | // write_byte(scroll speed in 0.1's) | ||
141 : | |||
142 : | #define TE_GUNSHOT 2 // Particle effect plus ricochet sound | ||
143 : | // write_byte(TE_GUNSHOT) | ||
144 : | // write_coord(position.x) | ||
145 : | // write_coord(position.y) | ||
146 : | // write_coord(position.z) | ||
147 : | |||
148 : | #define TE_EXPLOSION 3 // Additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps | ||
149 : | // write_byte(TE_EXPLOSION) | ||
150 : | // write_coord(position.x) | ||
151 : | // write_coord(position.y) | ||
152 : | // write_coord(position.z) | ||
153 : | // write_short(sprite index) | ||
154 : | // write_byte(scale in 0.1's) | ||
155 : | // write_byte(framerate) | ||
156 : | // write_byte(flags) | ||
157 : | // | ||
158 : | // The Explosion effect has some flags to control performance/aesthetic features: | ||
159 : | #define TE_EXPLFLAG_NONE 0 // All flags clear makes default Half-Life explosion | ||
160 : | #define TE_EXPLFLAG_NOADDITIVE 1 // Sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite) | ||
161 : | #define TE_EXPLFLAG_NODLIGHTS 2 // Do not render dynamic lights | ||
162 : | #define TE_EXPLFLAG_NOSOUND 4 // Do not play client explosion sound | ||
163 : | #define TE_EXPLFLAG_NOPARTICLES 8 // Do not draw particles | ||
164 : | |||
165 : | #define TE_TAREXPLOSION 4 // Quake1 "tarbaby" explosion with sound | ||
166 : | // write_byte(TE_TAREXPLOSION) | ||
167 : | // write_coord(position.x) | ||
168 : | // write_coord(position.y) | ||
169 : | // write_coord(position.z) | ||
170 : | |||
171 : | #define TE_SMOKE 5 // Alphablend sprite, move vertically 30 pps | ||
172 : | // write_byte(TE_SMOKE) | ||
173 : | // write_coord(position.x) | ||
174 : | // write_coord(position.y) | ||
175 : | // write_coord(position.z) | ||
176 : | // write_short(sprite index) | ||
177 : | // write_byte(scale in 0.1's) | ||
178 : | // write_byte(framerate) | ||
179 : | |||
180 : | #define TE_TRACER 6 // Tracer effect from point to point | ||
181 : | // write_byte(TE_TRACER) | ||
182 : | // write_coord(startposition.x) | ||
183 : | // write_coord(startposition.y) | ||
184 : | // write_coord(startposition.z) | ||
185 : | // write_coord(endposition.x) | ||
186 : | // write_coord(endposition.y) | ||
187 : | // write_coord(endposition.z) | ||
188 : | |||
189 : | #define TE_LIGHTNING 7 // TE_BEAMPOINTS with simplified parameters | ||
190 : | // write_byte(TE_LIGHTNING) | ||
191 : | // write_coord(startposition.x) | ||
192 : | // write_coord(startposition.y) | ||
193 : | // write_coord(startposition.z) | ||
194 : | // write_coord(endposition.x) | ||
195 : | // write_coord(endposition.y) | ||
196 : | // write_coord(endposition.z) | ||
197 : | // write_byte(life in 0.1's) | ||
198 : | // write_byte(width in 0.1's) | ||
199 : | // write_byte(amplitude in 0.01's) | ||
200 : | // write_short(sprite model index) | ||
201 : | |||
202 : | #define TE_BEAMENTS 8 | ||
203 : | // write_byte(TE_BEAMENTS) | ||
204 : | // write_short(start entity) | ||
205 : | // write_short(end entity) | ||
206 : | // write_short(sprite index) | ||
207 : | // write_byte(starting frame) | ||
208 : | // write_byte(frame rate in 0.1's) | ||
209 : | // write_byte(life in 0.1's) | ||
210 : | // write_byte(line width in 0.1's) | ||
211 : | // write_byte(noise amplitude in 0.01's) | ||
212 : | // write_byte(red) | ||
213 : | // write_byte(green) | ||
214 : | // write_byte(blue) | ||
215 : | // write_byte(brightness) | ||
216 : | // write_byte(scroll speed in 0.1's) | ||
217 : | |||
218 : | #define TE_SPARKS 9 // 8 random tracers with gravity, ricochet sprite | ||
219 : | // write_byte(TE_SPARKS) | ||
220 : | // write_coord(position.x) | ||
221 : | // write_coord(position.y) | ||
222 : | // write_coord(position.z) | ||
223 : | |||
224 : | #define TE_LAVASPLASH 10 // Quake1 lava splash | ||
225 : | // write_byte(TE_LAVASPLASH) | ||
226 : | // write_coord(position.x) | ||
227 : | // write_coord(position.y) | ||
228 : | // write_coord(position.z) | ||
229 : | |||
230 : | #define TE_TELEPORT 11 // Quake1 teleport splash | ||
231 : | // write_byte(TE_TELEPORT) | ||
232 : | // write_coord(position.x) | ||
233 : | // write_coord(position.y) | ||
234 : | // write_coord(position.z) | ||
235 : | |||
236 : | #define TE_EXPLOSION2 12 // Quake1 colormaped (base palette) particle explosion with sound | ||
237 : | // write_byte(TE_EXPLOSION2) | ||
238 : | // write_coord(position.x) | ||
239 : | // write_coord(position.y) | ||
240 : | // write_coord(position.z) | ||
241 : | // write_byte(starting color) | ||
242 : | // write_byte(num colors) | ||
243 : | |||
244 : | #define TE_BSPDECAL 13 // Decal from the .BSP file | ||
245 : | // write_byte(TE_BSPDECAL) | ||
246 : | // write_coord(position.x) decal position (center of texture in world) | ||
247 : | // write_coord(position.y) | ||
248 : | // write_coord(position.z) | ||
249 : | // write_short(texture index of precached decal texture name) | ||
250 : | // write_short(entity index) | ||
251 : | // [optional - write_short(index of model of above entity) only included if previous short is non-zero (not the world)] | ||
252 : | |||
253 : | #define TE_IMPLOSION 14 // Tracers moving toward a point | ||
254 : | // write_byte(TE_IMPLOSION) | ||
255 : | // write_coord(position.x) | ||
256 : | // write_coord(position.y) | ||
257 : | // write_coord(position.z) | ||
258 : | // write_byte(radius) | ||
259 : | // write_byte(count) | ||
260 : | // write_byte(life in 0.1's) | ||
261 : | |||
262 : | #define TE_SPRITETRAIL 15 // Line of moving glow sprites with gravity, fadeout, and collisions | ||
263 : | // write_byte(TE_SPRITETRAIL) | ||
264 : | // write_coord(startposition.x) | ||
265 : | // write_coord(startposition.y) | ||
266 : | // write_coord(startposition.z) | ||
267 : | // write_coord(endposition.x) | ||
268 : | // write_coord(endposition.y) | ||
269 : | // write_coord(endposition.z) | ||
270 : | // write_short(sprite index) | ||
271 : | // write_byte(count) | ||
272 : | // write_byte(life in 0.1's) | ||
273 : | // write_byte(scale in 0.1's) | ||
274 : | // write_byte(velocity along vector in 10's) | ||
275 : | // write_byte(randomness of velocity in 10's) | ||
276 : | |||
277 : | #define TE_SPRITE 17 // Additive sprite, plays 1 cycle | ||
278 : | // write_byte(TE_SPRITE) | ||
279 : | // write_coord(position.x) | ||
280 : | // write_coord(position.y) | ||
281 : | // write_coord(position.z) | ||
282 : | // write_short(sprite index) | ||
283 : | // write_byte(scale in 0.1's) | ||
284 : | // write_byte(brightness) | ||
285 : | |||
286 : | #define TE_BEAMSPRITE 18 // A beam with a sprite at the end | ||
287 : | // write_byte(TE_BEAMSPRITE) | ||
288 : | // write_coord(startposition.x) | ||
289 : | // write_coord(startposition.y) | ||
290 : | // write_coord(startposition.z) | ||
291 : | // write_coord(endposition.x) | ||
292 : | // write_coord(endposition.y) | ||
293 : | // write_coord(endposition.z) | ||
294 : | // write_short(beam sprite index) | ||
295 : | // write_short(end sprite index) | ||
296 : | |||
297 : | #define TE_BEAMTORUS 19 // Screen aligned beam ring, expands to max radius over lifetime | ||
298 : | // write_byte(TE_BEAMTORUS) | ||
299 : | // write_coord(position.x) | ||
300 : | // write_coord(position.y) | ||
301 : | // write_coord(position.z) | ||
302 : | // write_coord(axis.x) | ||
303 : | // write_coord(axis.y) | ||
304 : | // write_coord(axis.z) | ||
305 : | // write_short(sprite index) | ||
306 : | // write_byte(starting frame) | ||
307 : | // write_byte(frame rate in 0.1's) | ||
308 : | // write_byte(life in 0.1's) | ||
309 : | // write_byte(line width in 0.1's) | ||
310 : | // write_byte(noise amplitude in 0.01's) | ||
311 : | // write_byte(red) | ||
312 : | // write_byte(green) | ||
313 : | // write_byte(blue) | ||
314 : | // write_byte(brightness) | ||
315 : | // write_byte(scroll speed in 0.1's) | ||
316 : | |||
317 : | #define TE_BEAMDISK 20 // Disk that expands to max radius over lifetime | ||
318 : | // write_byte(TE_BEAMDISK) | ||
319 : | // write_coord(position.x) | ||
320 : | // write_coord(position.y) | ||
321 : | // write_coord(position.z) | ||
322 : | // write_coord(axis.x) | ||
323 : | // write_coord(axis.y) | ||
324 : | // write_coord(axis.z) | ||
325 : | // write_short(sprite index) | ||
326 : | // write_byte(starting frame) | ||
327 : | // write_byte(frame rate in 0.1's) | ||
328 : | // write_byte(life in 0.1's) | ||
329 : | // write_byte(line width in 0.1's) | ||
330 : | // write_byte(noise amplitude in 0.01's) | ||
331 : | // write_byte(red) | ||
332 : | // write_byte(green) | ||
333 : | // write_byte(blue) | ||
334 : | // write_byte(brightness) | ||
335 : | // write_byte(scroll speed in 0.1's) | ||
336 : | |||
337 : | #define TE_BEAMCYLINDER 21 // Cylinder that expands to max radius over lifetime | ||
338 : | // write_byte(TE_BEAMCYLINDER) | ||
339 : | // write_coord(position.x) | ||
340 : | // write_coord(position.y) | ||
341 : | // write_coord(position.z) | ||
342 : | // write_coord(axis.x) | ||
343 : | // write_coord(axis.y) | ||
344 : | // write_coord(axis.z) | ||
345 : | // write_short(sprite index) | ||
346 : | // write_byte(starting frame) | ||
347 : | // write_byte(frame rate in 0.1's) | ||
348 : | // write_byte(life in 0.1's) | ||
349 : | // write_byte(line width in 0.1's) | ||
350 : | // write_byte(noise amplitude in 0.01's) | ||
351 : | // write_byte(red) | ||
352 : | // write_byte(green) | ||
353 : | // write_byte(blue) | ||
354 : | // write_byte(brightness) | ||
355 : | // write_byte(scroll speed in 0.1's) | ||
356 : | |||
357 : | #define TE_BEAMFOLLOW 22 // Create a line of decaying beam segments until entity stops moving | ||
358 : | // write_byte(TE_BEAMFOLLOW) | ||
359 : | // write_short(entity:attachment to follow) | ||
360 : | // write_short(sprite index) | ||
361 : | // write_byte(life in 0.1's) | ||
362 : | // write_byte(line width in 0.1's) | ||
363 : | // write_byte(red) | ||
364 : | // write_byte(green) | ||
365 : | // write_byte(blue) | ||
366 : | // write_byte(brightness) | ||
367 : | |||
368 : | #define TE_GLOWSPRITE 23 | ||
369 : | // write_byte(TE_GLOWSPRITE) | ||
370 : | // write_coord(position.x) | ||
371 : | // write_coord(position.y) | ||
372 : | // write_coord(position.z) | ||
373 : | // write_short(model index) | ||
374 : | // write_byte(scale / 10) | ||
375 : | ian | 44 | // write_byte(size) |
376 : | // write_byte(brightness) | ||
377 : | ian | 1 | |
378 : | #define TE_BEAMRING 24 // Connect a beam ring to two entities | ||
379 : | // write_byte(TE_BEAMRING) | ||
380 : | // write_short(start entity) | ||
381 : | // write_short(end entity) | ||
382 : | // write_short(sprite index) | ||
383 : | // write_byte(starting frame) | ||
384 : | // write_byte(frame rate in 0.1's) | ||
385 : | // write_byte(life in 0.1's) | ||
386 : | // write_byte(line width in 0.1's) | ||
387 : | // write_byte(noise amplitude in 0.01's) | ||
388 : | // write_byte(red) | ||
389 : | // write_byte(green) | ||
390 : | // write_byte(blue) | ||
391 : | // write_byte(brightness) | ||
392 : | // write_byte(scroll speed in 0.1's) | ||
393 : | |||
394 : | #define TE_STREAK_SPLASH 25 // Oriented shower of tracers | ||
395 : | // write_byte(TE_STREAK_SPLASH) | ||
396 : | // write_coord(startposition.x) | ||
397 : | // write_coord(startposition.y) | ||
398 : | // write_coord(startposition.z) | ||
399 : | // write_coord(vector.x) | ||
400 : | // write_coord(vector.y) | ||
401 : | // write_coord(vector.z) | ||
402 : | // write_byte(color) | ||
403 : | // write_short(count) | ||
404 : | // write_short(base speed) | ||
405 : | // write_short(ramdon velocity) | ||
406 : | |||
407 : | #define TE_DLIGHT 27 // Dynamic light, effect world, minor entity effect | ||
408 : | // write_byte(TE_DLIGHT) | ||
409 : | // write_coord(position.x) | ||
410 : | // write_coord(position.y) | ||
411 : | // write_coord(position.z) | ||
412 : | // write_byte(radius in 10's) | ||
413 : | // write_byte(red) | ||
414 : | // write_byte(green) | ||
415 : | // write_byte(blue) | ||
416 : | ian | 17 | // write_byte(brightness) |
417 : | ian | 1 | // write_byte(life in 10's) |
418 : | // write_byte(decay rate in 10's) | ||
419 : | |||
420 : | #define TE_ELIGHT 28 // Point entity light, no world effect | ||
421 : | // write_byte(TE_ELIGHT) | ||
422 : | // write_short(entity:attachment to follow) | ||
423 : | // write_coord(position.x) | ||
424 : | // write_coord(position.y) | ||
425 : | // write_coord(position.z) | ||
426 : | // write_coord(radius) | ||
427 : | // write_byte(red) | ||
428 : | // write_byte(green) | ||
429 : | // write_byte(blue) | ||
430 : | // write_byte(life in 0.1's) | ||
431 : | // write_coord(decay rate) | ||
432 : | |||
433 : | #define TE_TEXTMESSAGE 29 | ||
434 : | // write_byte(TE_TEXTMESSAGE) | ||
435 : | // write_byte(channel) | ||
436 : | // write_short(x) -1 = center) | ||
437 : | // write_short(y) -1 = center) | ||
438 : | // write_byte(effect) 0 = fade in/fade out, 1 is flickery credits, 2 is write out (training room) | ||
439 : | // write_byte(red) - text color | ||
440 : | // write_byte(green) | ||
441 : | // write_byte(blue) | ||
442 : | // write_byte(alpha) | ||
443 : | // write_byte(red) - effect color | ||
444 : | // write_byte(green) | ||
445 : | // write_byte(blue) | ||
446 : | // write_byte(alpha) | ||
447 : | // write_short(fadein time) | ||
448 : | // write_short(fadeout time) | ||
449 : | // write_short(hold time) | ||
450 : | // [optional] write_short(fxtime) time the highlight lags behing the leading text in effect 2 | ||
451 : | // write_string(text message) 512 chars max string size | ||
452 : | |||
453 : | #define TE_LINE 30 | ||
454 : | // write_byte(TE_LINE) | ||
455 : | // write_coord(startposition.x) | ||
456 : | // write_coord(startposition.y) | ||
457 : | // write_coord(startposition.z) | ||
458 : | // write_coord(endposition.x) | ||
459 : | // write_coord(endposition.y) | ||
460 : | // write_coord(endposition.z) | ||
461 : | // write_short(life in 0.1 s) | ||
462 : | // write_byte(red) | ||
463 : | // write_byte(green) | ||
464 : | // write_byte(blue) | ||
465 : | |||
466 : | #define TE_BOX 31 | ||
467 : | // write_byte(TE_BOX) | ||
468 : | // write_coord(boxmins.x) | ||
469 : | // write_coord(boxmins.y) | ||
470 : | // write_coord(boxmins.z) | ||
471 : | // write_coord(boxmaxs.x) | ||
472 : | // write_coord(boxmaxs.y) | ||
473 : | // write_coord(boxmaxs.z) | ||
474 : | // write_short(life in 0.1 s) | ||
475 : | // write_byte(red) | ||
476 : | // write_byte(green) | ||
477 : | // write_byte(blue) | ||
478 : | |||
479 : | #define TE_KILLBEAM 99 // Kill all beams attached to entity | ||
480 : | // write_byte(TE_KILLBEAM) | ||
481 : | // write_short(entity) | ||
482 : | |||
483 : | #define TE_LARGEFUNNEL 100 | ||
484 : | // write_byte(TE_LARGEFUNNEL) | ||
485 : | // write_coord(position.x) | ||
486 : | // write_coord(position.y) | ||
487 : | // write_coord(position.z) | ||
488 : | // write_short(sprite index) | ||
489 : | // write_short(flags) | ||
490 : | |||
491 : | #define TE_BLOODSTREAM 101 // Particle spray | ||
492 : | // write_byte(TE_BLOODSTREAM) | ||
493 : | // write_coord(position.x) | ||
494 : | // write_coord(position.y) | ||
495 : | // write_coord(position.z) | ||
496 : | // write_coord(vector.x) | ||
497 : | // write_coord(vector.y) | ||
498 : | // write_coord(vector.z) | ||
499 : | // write_byte(color) | ||
500 : | // write_byte(speed) | ||
501 : | |||
502 : | #define TE_SHOWLINE 102 // Line of particles every 5 units, dies in 30 seconds | ||
503 : | // write_byte(TE_SHOWLINE) | ||
504 : | // write_coord(startposition.x) | ||
505 : | // write_coord(startposition.y) | ||
506 : | // write_coord(startposition.z) | ||
507 : | // write_coord(endposition.x) | ||
508 : | // write_coord(endposition.y) | ||
509 : | // write_coord(endposition.z) | ||
510 : | |||
511 : | #define TE_BLOOD 103 // Particle spray | ||
512 : | // write_byte(TE_BLOOD) | ||
513 : | // write_coord(position.x) | ||
514 : | // write_coord(position.y) | ||
515 : | // write_coord(position.z) | ||
516 : | // write_coord(vector.x) | ||
517 : | // write_coord(vector.y) | ||
518 : | // write_coord(vector.z) | ||
519 : | // write_byte(color) | ||
520 : | // write_byte(speed) | ||
521 : | |||
522 : | #define TE_DECAL 104 // Decal applied to a brush entity (not the world) | ||
523 : | // write_byte(TE_DECAL) | ||
524 : | // write_coord(position.x) decal position (center of texture in world) | ||
525 : | // write_coord(position.y) | ||
526 : | // write_coord(position.z) | ||
527 : | // write_byte(texture index of precached decal texture name) | ||
528 : | // write_short(entity index) | ||
529 : | |||
530 : | #define TE_FIZZ 105 // Create alpha sprites inside of entity, float upwards | ||
531 : | // write_byte(TE_FIZZ) | ||
532 : | // write_short(entity) | ||
533 : | // write_short(sprite index) | ||
534 : | // write_byte density) | ||
535 : | |||
536 : | #define TE_MODEL 106 // Create a moving model that bounces and makes a sound when it hits | ||
537 : | // write_byte(TE_MODEL) | ||
538 : | // write_coord(position.x) | ||
539 : | // write_coord(position.y) | ||
540 : | // write_coord(position.z) | ||
541 : | // write_coord(velocity.x) | ||
542 : | // write_coord(velocity.y) | ||
543 : | // write_coord(velocity.z) | ||
544 : | // write_angle(initial yaw) | ||
545 : | // write_short(model index) | ||
546 : | // write_byte(bounce sound type) | ||
547 : | // write_byte(life in 0.1's) | ||
548 : | |||
549 : | #define TE_EXPLODEMODEL 107 // Spherical shower of models, picks from set | ||
550 : | // write_byte(TE_EXPLODEMODEL) | ||
551 : | // write_coord(origin.x) | ||
552 : | // write_coord(origin.y) | ||
553 : | // write_coord(origin.z) | ||
554 : | // write_coord(velocity.x) | ||
555 : | // write_coord(velocity.y) | ||
556 : | // write_coord(velocity.z) | ||
557 : | // write_short(model index) | ||
558 : | // write_short(count) | ||
559 : | // write_byte(life in 0.1's) | ||
560 : | |||
561 : | #define TE_BREAKMODEL 108 // Box of models or sprites | ||
562 : | // write_byte(TE_BREAKMODEL) | ||
563 : | // write_coord(position.x) | ||
564 : | // write_coord(position.y) | ||
565 : | // write_coord(position.z) | ||
566 : | // write_coord(size.x) | ||
567 : | // write_coord(size.y) | ||
568 : | // write_coord(size.z) | ||
569 : | // write_coord(velocity.x) | ||
570 : | // write_coord(velocity.y) | ||
571 : | // write_coord(velocity.z) | ||
572 : | // write_byte(random velocity in 10's) | ||
573 : | // write_short(sprite or model index) | ||
574 : | // write_byte(count) | ||
575 : | // write_byte(life in 0.1 secs) | ||
576 : | // write_byte(flags) | ||
577 : | |||
578 : | #define TE_GUNSHOTDECAL 109 // Decal and ricochet sound | ||
579 : | // write_byte(TE_GUNSHOTDECAL) | ||
580 : | // write_coord(position.x) | ||
581 : | // write_coord(position.y) | ||
582 : | // write_coord(position.z) | ||
583 : | // write_short(entity index???) | ||
584 : | // write_byte(decal???) | ||
585 : | |||
586 : | #define TE_SPRITE_SPRAY 110 // Spray of alpha sprites | ||
587 : | // write_byte(TE_SPRITE_SPRAY) | ||
588 : | // write_coord(position.x) | ||
589 : | // write_coord(position.y) | ||
590 : | // write_coord(position.z) | ||
591 : | // write_coord(velocity.x) | ||
592 : | // write_coord(velocity.y) | ||
593 : | // write_coord(velocity.z) | ||
594 : | // write_short(sprite index) | ||
595 : | // write_byte(count) | ||
596 : | // write_byte(speed) | ||
597 : | // write_byte(noise) | ||
598 : | |||
599 : | #define TE_ARMOR_RICOCHET 111 // Quick spark sprite, client ricochet sound. | ||
600 : | // write_byte(TE_ARMOR_RICOCHET) | ||
601 : | // write_coord(position.x) | ||
602 : | // write_coord(position.y) | ||
603 : | // write_coord(position.z) | ||
604 : | // write_byte(scale in 0.1's) | ||
605 : | |||
606 : | #define TE_PLAYERDECAL 112 | ||
607 : | // write_byte(TE_PLAYERDECAL) | ||
608 : | // write_byte(playerindex) | ||
609 : | // write_coord(position.x) | ||
610 : | // write_coord(position.y) | ||
611 : | // write_coord(position.z) | ||
612 : | // write_short(entity???) | ||
613 : | // write_byte(decal number) | ||
614 : | // [optional] write_short(model index) | ||
615 : | |||
616 : | #define TE_BUBBLES 113 // Create alpha sprites inside of box, float upwards | ||
617 : | // write_byte(TE_BUBBLES) | ||
618 : | // write_coord(position.x) (min start position) | ||
619 : | // write_coord(position.y) | ||
620 : | // write_coord(position.z) | ||
621 : | // write_coord(position.x) (max start position) | ||
622 : | // write_coord(position.y) | ||
623 : | // write_coord(position.z) | ||
624 : | // write_coord(float height) | ||
625 : | // write_short(model index) | ||
626 : | // write_byte(count) | ||
627 : | // write_coord(speed) | ||
628 : | |||
629 : | #define TE_BUBBLETRAIL 114 // Create alpha sprites along a line, float upwards | ||
630 : | // write_byte(TE_BUBBLETRAIL) | ||
631 : | // write_coord(position.x) (min start position) | ||
632 : | // write_coord(position.y) (min start position) | ||
633 : | // write_coord(position.z) (min start position) | ||
634 : | // write_coord(position.x) (max start position) | ||
635 : | // write_coord(position.y) (max start position) | ||
636 : | // write_coord(position.z) (max start position) | ||
637 : | // write_coord(float height) | ||
638 : | // write_short(model index) | ||
639 : | // write_byte(count) | ||
640 : | // write_coord(speed) | ||
641 : | |||
642 : | #define TE_BLOODSPRITE 115 // Spray of opaque sprite1's that fall, single sprite2 for 1..2 secs (this is a high-priority tent) | ||
643 : | // write_byte(TE_BLOODSPRITE) | ||
644 : | // write_coord(position.x) | ||
645 : | // write_coord(position.y) | ||
646 : | // write_coord(position.z) | ||
647 : | // write_short(sprite1 index) | ||
648 : | // write_short(sprite2 index) | ||
649 : | // write_byte(color) | ||
650 : | // write_byte(scale) | ||
651 : | |||
652 : | #define TE_WORLDDECAL 116 // Decal applied to the world brush | ||
653 : | // write_byte(TE_WORLDDECAL) | ||
654 : | // write_coord(position.x) decal position (center of texture in world) | ||
655 : | // write_coord(position.y) | ||
656 : | // write_coord(position.z) | ||
657 : | // write_byte(texture index of precached decal texture name) | ||
658 : | |||
659 : | #define TE_WORLDDECALHIGH 117 // Decal (with texture index > 256) applied to world brush | ||
660 : | // write_byte(TE_WORLDDECALHIGH) | ||
661 : | // write_coord(position.x) decal position (center of texture in world) | ||
662 : | // write_coord(position.y) | ||
663 : | // write_coord(position.z) | ||
664 : | // write_byte(texture index of precached decal texture name - 256) | ||
665 : | |||
666 : | #define TE_DECALHIGH 118 // Same as TE_DECAL, but the texture index was greater than 256 | ||
667 : | // write_byte(TE_DECALHIGH) | ||
668 : | // write_coord(position.x) decal position (center of texture in world) | ||
669 : | // write_coord(position.y) | ||
670 : | // write_coord(position.z) | ||
671 : | // write_byte(texture index of precached decal texture name - 256) | ||
672 : | // write_short(entity index) | ||
673 : | |||
674 : | #define TE_PROJECTILE 119 // Makes a projectile (like a nail) (this is a high-priority tent) | ||
675 : | // write_byte(TE_PROJECTILE) | ||
676 : | // write_coord(position.x) | ||
677 : | // write_coord(position.y) | ||
678 : | // write_coord(position.z) | ||
679 : | // write_coord(velocity.x) | ||
680 : | // write_coord(velocity.y) | ||
681 : | // write_coord(velocity.z) | ||
682 : | // write_short(modelindex) | ||
683 : | // write_byte(life) | ||
684 : | // write_byte(owner) projectile won't collide with owner (if owner == 0, projectile will hit any client). | ||
685 : | |||
686 : | #define TE_SPRAY 120 // Throws a shower of sprites or models | ||
687 : | // write_byte(TE_SPRAY) | ||
688 : | // write_coord(position.x) | ||
689 : | // write_coord(position.y) | ||
690 : | // write_coord(position.z) | ||
691 : | // write_coord(direction.x) | ||
692 : | // write_coord(direction.y) | ||
693 : | // write_coord(direction.z) | ||
694 : | // write_short(modelindex) | ||
695 : | // write_byte(count) | ||
696 : | // write_byte(speed) | ||
697 : | // write_byte(noise) | ||
698 : | // write_byte(rendermode) | ||
699 : | |||
700 : | #define TE_PLAYERSPRITES 121 // Sprites emit from a player's bounding box (ONLY use for players!) | ||
701 : | // write_byte(TE_PLAYERSPRITES) | ||
702 : | ian | 44 | // write_short(playernum) |
703 : | ian | 1 | // write_short(sprite modelindex) |
704 : | // write_byte(count) | ||
705 : | // write_byte(variance) (0 = no variance in size) (10 = 10% variance in size) | ||
706 : | |||
707 : | #define TE_PARTICLEBURST 122 // Very similar to lavasplash | ||
708 : | // write_byte(TE_PARTICLEBURST) | ||
709 : | // write_coord(origin) | ||
710 : | // write_short(radius) | ||
711 : | // write_byte(particle color) | ||
712 : | // write_byte(duration * 10) (will be randomized a bit) | ||
713 : | |||
714 : | #define TE_FIREFIELD 123 // Makes a field of fire | ||
715 : | // write_byte(TE_FIREFIELD) | ||
716 : | // write_coord(origin) | ||
717 : | // write_short(radius) (fire is made in a square around origin. -radius, -radius to radius, radius) | ||
718 : | // write_short(modelindex) | ||
719 : | // write_byte(count) | ||
720 : | // write_byte(flags) | ||
721 : | // write_byte(duration (in seconds) * 10) (will be randomized a bit) | ||
722 : | // | ||
723 : | // to keep network traffic low, this message has associated flags that fit into a byte: | ||
724 : | #define TEFIRE_FLAG_ALLFLOAT 1 // All sprites will drift upwards as they animate | ||
725 : | #define TEFIRE_FLAG_SOMEFLOAT 2 // Some of the sprites will drift upwards. (50% chance) | ||
726 : | #define TEFIRE_FLAG_LOOP 4 // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration. | ||
727 : | #define TEFIRE_FLAG_ALPHA 8 // If set, sprite is rendered alpha blended at 50% else, opaque | ||
728 : | #define TEFIRE_FLAG_PLANAR 16 // If set, all fire sprites have same initial Z instead of randomly filling a cube. | ||
729 : | |||
730 : | #define TE_PLAYERATTACHMENT 124 // Attaches a TENT to a player (this is a high-priority tent) | ||
731 : | // write_byte(TE_PLAYERATTACHMENT) | ||
732 : | // write_byte(entity index of player) | ||
733 : | // write_coord(vertical offset) (attachment origin.z = player origin.z + vertical offset) | ||
734 : | // write_short(model index) | ||
735 : | // write_short(life * 10 ) | ||
736 : | |||
737 : | #define TE_KILLPLAYERATTACHMENTS 125 // Will expire all TENTS attached to a player. | ||
738 : | // write_byte(TE_KILLPLAYERATTACHMENTS) | ||
739 : | // write_byte(entity index of player) | ||
740 : | |||
741 : | #define TE_MULTIGUNSHOT 126 // Much more compact shotgun message | ||
742 : | // This message is used to make a client approximate a 'spray' of gunfire. | ||
743 : | // Any weapon that fires more than one bullet per frame and fires in a bit of a spread is | ||
744 : | // a good candidate for MULTIGUNSHOT use. (shotguns) | ||
745 : | // | ||
746 : | // NOTE: This effect makes the client do traces for each bullet, these client traces ignore | ||
747 : | // entities that have studio models.Traces are 4096 long. | ||
748 : | // | ||
749 : | // write_byte(TE_MULTIGUNSHOT) | ||
750 : | // write_coord(origin.x) | ||
751 : | // write_coord(origin.y) | ||
752 : | // write_coord(origin.z) | ||
753 : | // write_coord(direction.x) | ||
754 : | // write_coord(direction.y) | ||
755 : | // write_coord(direction.z) | ||
756 : | // write_coord(x noise * 100) | ||
757 : | // write_coord(y noise * 100) | ||
758 : | // write_byte(count) | ||
759 : | // write_byte(bullethole decal texture index) | ||
760 : | |||
761 : | #define TE_USERTRACER 127 // Larger message than the standard tracer, but allows some customization. | ||
762 : | // write_byte(TE_USERTRACER) | ||
763 : | // write_coord(origin.x) | ||
764 : | // write_coord(origin.y) | ||
765 : | // write_coord(origin.z) | ||
766 : | // write_coord(velocity.x) | ||
767 : | // write_coord(velocity.y) | ||
768 : | // write_coord(velocity.z) | ||
769 : | // write_byte(life * 10) | ||
770 : | // write_byte(color) this is an index into an array of color vectors in the engine. (0 - ) | ||
771 : | // write_byte(length * 10) | ||
772 : | ian | 17 | |
773 : | // From hltv.h from the HLSDK, these are used in conjunction with SVC_DIRECTOR | ||
774 : | // sub commands of svc_director: | ||
775 : | #define DRC_CMD_NONE 0 // NULL director command | ||
776 : | #define DRC_CMD_START 1 // start director mode | ||
777 : | #define DRC_CMD_EVENT 2 // informs about director command | ||
778 : | #define DRC_CMD_MODE 3 // switches camera modes | ||
779 : | #define DRC_CMD_CAMERA 4 // sets camera registers | ||
780 : | #define DRC_CMD_TIMESCALE 5 // sets time scale | ||
781 : | #define DRC_CMD_MESSAGE 6 // send HUD centerprint | ||
782 : | #define DRC_CMD_SOUND 7 // plays a particular sound | ||
783 : | #define DRC_CMD_STATUS 8 // status info about broadcast | ||
784 : | #define DRC_CMD_BANNER 9 // banner file name for HLTV gui | ||
785 : | #define DRC_CMD_FADE 10 // send screen fade command | ||
786 : | #define DRC_CMD_SHAKE 11 // send screen shake command | ||
787 : | #define DRC_CMD_STUFFTEXT 12 // like the normal svc_stufftext but as director command | ||
788 : | |||
789 : | #define DRC_CMD_LAST 12 | ||
790 : | |||
791 : | // HLTV_EVENT event flags | ||
792 : | #define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important) | ||
793 : | #define DRC_FLAG_SIDE (1<<4) // | ||
794 : | #define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene | ||
795 : | #define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo | ||
796 : | #define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc) | ||
797 : | #define DRC_FLAG_INTRO (1<<8) // is a introduction scene | ||
798 : | #define DRC_FLAG_FINAL (1<<9) // is a final scene | ||
799 : | #define DRC_FLAG_NO_RANDOM (1<<10) // don't randomize event data | ||
800 : | |||
801 : | |||
802 : | #define MAX_DIRECTOR_CMD_PARAMETERS 4 | ||
803 : | #define MAX_DIRECTOR_CMD_STRING 128 |
Contact | ViewVC Help |
Powered by ViewVC 1.0.4 |