icculus quake2 doxygen  1.0 dev
cl_fxmax.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 // cl_fx.c -- entity effects parsing and management
21 
22 #include "client.h"
23 
24 void CL_ParticleBulletDecal (vec3_t org, vec3_t dir, float size);
25 void CL_LogoutEffect (vec3_t org, int type);
27 
28 void CL_GunSmokeEffect (vec3_t org, vec3_t dir);
29 
30 trace_t CL_Trace (vec3_t start, vec3_t end, float size, int contentmask);
32 
33 extern struct model_s *cl_mod_smoke;
34 extern struct model_s *cl_mod_flash;
35 
36 //here i convert old 256 color to RGB -- hax0r l337
37 const byte default_pal[768] =
38 {
39 0,0,0,15,15,15,31,31,31,47,47,47,63,63,63,75,75,75,91,91,91,107,107,107,123,123,123,139,139,139,155,155,155,171,171,171,187,187,187,203,203,203,219,219,219,235,235,235,99,75,35,91,67,31,83,63,31,79,59,27,71,55,27,63,47,
40 23,59,43,23,51,39,19,47,35,19,43,31,19,39,27,15,35,23,15,27,19,11,23,15,11,19,15,7,15,11,7,95,95,111,91,91,103,91,83,95,87,79,91,83,75,83,79,71,75,71,63,67,63,59,59,59,55,55,51,47,47,47,43,43,39,
41 39,39,35,35,35,27,27,27,23,23,23,19,19,19,143,119,83,123,99,67,115,91,59,103,79,47,207,151,75,167,123,59,139,103,47,111,83,39,235,159,39,203,139,35,175,119,31,147,99,27,119,79,23,91,59,15,63,39,11,35,23,7,167,59,43,
42 159,47,35,151,43,27,139,39,19,127,31,15,115,23,11,103,23,7,87,19,0,75,15,0,67,15,0,59,15,0,51,11,0,43,11,0,35,11,0,27,7,0,19,7,0,123,95,75,115,87,67,107,83,63,103,79,59,95,71,55,87,67,51,83,63,
43 47,75,55,43,67,51,39,63,47,35,55,39,27,47,35,23,39,27,19,31,23,15,23,15,11,15,11,7,111,59,23,95,55,23,83,47,23,67,43,23,55,35,19,39,27,15,27,19,11,15,11,7,179,91,79,191,123,111,203,155,147,215,187,183,203,
44 215,223,179,199,211,159,183,195,135,167,183,115,151,167,91,135,155,71,119,139,47,103,127,23,83,111,19,75,103,15,67,91,11,63,83,7,55,75,7,47,63,7,39,51,0,31,43,0,23,31,0,15,19,0,7,11,0,0,0,139,87,87,131,79,79,
45 123,71,71,115,67,67,107,59,59,99,51,51,91,47,47,87,43,43,75,35,35,63,31,31,51,27,27,43,19,19,31,15,15,19,11,11,11,7,7,0,0,0,151,159,123,143,151,115,135,139,107,127,131,99,119,123,95,115,115,87,107,107,79,99,99,
46 71,91,91,67,79,79,59,67,67,51,55,55,43,47,47,35,35,35,27,23,23,19,15,15,11,159,75,63,147,67,55,139,59,47,127,55,39,119,47,35,107,43,27,99,35,23,87,31,19,79,27,15,67,23,11,55,19,11,43,15,7,31,11,7,23,
47 7,0,11,0,0,0,0,0,119,123,207,111,115,195,103,107,183,99,99,167,91,91,155,83,87,143,75,79,127,71,71,115,63,63,103,55,55,87,47,47,75,39,39,63,35,31,47,27,23,35,19,15,23,11,7,7,155,171,123,143,159,111,135,151,99,
48 123,139,87,115,131,75,103,119,67,95,111,59,87,103,51,75,91,39,63,79,27,55,67,19,47,59,11,35,47,7,27,35,0,19,23,0,11,15,0,0,255,0,35,231,15,63,211,27,83,187,39,95,167,47,95,143,51,95,123,51,255,255,255,255,255,
49 211,255,255,167,255,255,127,255,255,83,255,255,39,255,235,31,255,215,23,255,191,15,255,171,7,255,147,0,239,127,0,227,107,0,211,87,0,199,71,0,183,59,0,171,43,0,155,31,0,143,23,0,127,15,0,115,7,0,95,0,0,71,0,0,47,
50 0,0,27,0,0,239,0,0,55,55,255,255,0,0,0,0,255,43,43,35,27,27,23,19,19,15,235,151,127,195,115,83,159,87,51,123,63,27,235,211,199,199,171,155,167,139,119,135,107,87,159,91,83
51 };
52 
53 //this initializes all particle images - mods play with this...
54 void SetParticleImages (void)
55 {
56  //tgas
57  re.SetParticlePicture(particle_generic, "particles/basic.tga");
58  re.SetParticlePicture(particle_smoke, "particles/smoke.tga");
59  re.SetParticlePicture(particle_blood, "particles/blood.tga");
60  re.SetParticlePicture(particle_blooddrop, "particles/blood_drop.tga");
61  re.SetParticlePicture(particle_blooddrip, "particles/blood_drip.tga");
62  re.SetParticlePicture(particle_redblood, "particles/blood_red.tga");
63  re.SetParticlePicture(particle_bubble, "particles/bubble.tga");
64  re.SetParticlePicture(particle_lensflare, "particles/lensflare.tga");
65  re.SetParticlePicture(particle_inferno, "particles/inferno.tga");
66  re.SetParticlePicture(particle_footprint, "particles/footprint.tga");
67  re.SetParticlePicture(particle_blaster, "particles/blaster.tga");
68 
69  //jpgs
70  re.SetParticlePicture(particle_shield, "particles/shield.jpg");
71  re.SetParticlePicture(particle_beam, "particles/beam.jpg");
72  re.SetParticlePicture(particle_lightning, "particles/lightning.jpg");
73  re.SetParticlePicture(particle_lightflare, "particles/lightflare.jpg");
74 
75  //animations
76  //explosion
77  re.SetParticlePicture(particle_rexplosion1, "particles/r_explod_1.tga");
78  re.SetParticlePicture(particle_rexplosion2, "particles/r_explod_2.tga");
79  re.SetParticlePicture(particle_rexplosion3, "particles/r_explod_3.tga");
80  re.SetParticlePicture(particle_rexplosion4, "particles/r_explod_4.tga");
81  re.SetParticlePicture(particle_rexplosion5, "particles/r_explod_5.tga");
82  re.SetParticlePicture(particle_rexplosion6, "particles/r_explod_6.tga");
83  re.SetParticlePicture(particle_rexplosion7, "particles/r_explod_7.tga");
84 
85  re.SetParticlePicture(particle_dexplosion1, "particles/d_explod_1.tga");
86  re.SetParticlePicture(particle_dexplosion2, "particles/d_explod_2.tga");
87  re.SetParticlePicture(particle_dexplosion3, "particles/d_explod_3.tga");
88 
89 }
90 
91 void pRotateThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time);
92 
93 int color8red (int color8)
94 {
95  return (default_pal[color8*3+0]);
96 }
97 int color8green (int color8)
98 {
99  return (default_pal[color8*3+1]);;
100 }
101 int color8blue (int color8)
102 {
103  return (default_pal[color8*3+2]);;
104 }
105 
106 void vectoanglerolled (vec3_t value1, float angleyaw, vec3_t angles)
107 {
108  float forward, yaw, pitch;
109 
110  yaw = (int) (atan2(value1[1], value1[0]) * 180 / M_PI);
111  forward = sqrt (value1[0]*value1[0] + value1[1]*value1[1]);
112  pitch = (int) (atan2(value1[2], forward) * 180 / M_PI);
113 
114  if (pitch < 0)
115  pitch += 360;
116 
117  angles[PITCH] = -pitch;
118  angles[YAW] = yaw;
119  angles[ROLL] = - angleyaw;
120 }
121 
122 void ClipCam (vec3_t start, vec3_t end, vec3_t newpos)
123 {
124  int i;
125 
126  trace_t tr = CL_Trace (start, end, 5, 1);
127  for (i=0;i<3;i++)
128  newpos[i]=tr.endpos[i];
129 }
130 
131 /*
132 ==============================================================
133 
134 LIGHT STYLE MANAGEMENT
135 
136 ==============================================================
137 */
138 
139 typedef struct
140 {
141  int length;
142  float value[3];
143  float map[MAX_QPATH];
144 } clightstyle_t;
145 
148 
149 /*
150 ================
151 CL_ClearLightStyles
152 ================
153 */
155 {
156  memset (cl_lightstyle, 0, sizeof(cl_lightstyle));
157  lastofs = -1;
158 }
159 
160 /*
161 ================
162 CL_RunLightStyles
163 ================
164 */
165 void CL_RunLightStyles (void)
166 {
167  int ofs;
168  int i;
169  clightstyle_t *ls;
170 
171  ofs = cl.time / 100;
172  if (ofs == lastofs)
173  return;
174  lastofs = ofs;
175 
176  for (i=0,ls=cl_lightstyle ; i<MAX_LIGHTSTYLES ; i++, ls++)
177  {
178  if (!ls->length)
179  {
180  ls->value[0] = ls->value[1] = ls->value[2] = 1.0;
181  continue;
182  }
183  if (ls->length == 1)
184  ls->value[0] = ls->value[1] = ls->value[2] = ls->map[0];
185  else
186  ls->value[0] = ls->value[1] = ls->value[2] = ls->map[ofs%ls->length];
187  }
188 }
189 
190 
191 void CL_SetLightstyle (int i)
192 {
193  char *s;
194  int j, k;
195 
197 
198  j = strlen (s);
199  if (j >= MAX_QPATH)
200  Com_Error (ERR_DROP, "svc_lightstyle length=%i", j);
201 
202  cl_lightstyle[i].length = j;
203 
204  for (k=0 ; k<j ; k++)
205  cl_lightstyle[i].map[k] = (float)(s[k]-'a')/(float)('m'-'a');
206 }
207 
208 /*
209 ================
210 CL_AddLightStyles
211 ================
212 */
213 void CL_AddLightStyles (void)
214 {
215  int i;
216  clightstyle_t *ls;
217 
218  for (i=0,ls=cl_lightstyle ; i<MAX_LIGHTSTYLES ; i++, ls++)
219  V_AddLightStyle (i, ls->value[0], ls->value[1], ls->value[2]);
220 }
221 
222 /*
223 ==============================================================
224 
225 DLIGHT MANAGEMENT
226 
227 ==============================================================
228 */
229 
231 
232 /*
233 ================
234 CL_ClearDlights
235 ================
236 */
237 void CL_ClearDlights (void)
238 {
239  memset (cl_dlights, 0, sizeof(cl_dlights));
240 }
241 
242 /*
243 ===============
244 CL_AllocDlight
245 
246 ===============
247 */
249 {
250  int i;
251  cdlight_t *dl;
252 
253 // first look for an exact key match
254  if (key)
255  {
256  dl = cl_dlights;
257  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
258  {
259  if (dl->key == key)
260  {
261  memset (dl, 0, sizeof(*dl));
262  dl->key = key;
263  return dl;
264  }
265  }
266  }
267 
268 // then look for anything else
269  dl = cl_dlights;
270  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
271  {
272  if (dl->die < cl.time)
273  {
274  memset (dl, 0, sizeof(*dl));
275  dl->key = key;
276  return dl;
277  }
278  }
279 
280  dl = &cl_dlights[0];
281  memset (dl, 0, sizeof(*dl));
282  dl->key = key;
283  return dl;
284 }
285 
287 {
288  int i;
289  cdlight_t *dl;
290 
291 // then look for anything else
292  dl = cl_dlights;
293  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
294  {
295  if (dl->die < cl.time)
296  {
297  memset (dl, 0, sizeof(*dl));
298  dl->key = -1;
299  return dl;
300  }
301  }
302 
303  dl = &cl_dlights[0];
304  memset (dl, 0, sizeof(*dl));
305  dl->key = -1;
306  return dl;
307 }
308 
309 /*
310 ===============
311 CL_NewDlight
312 ===============
313 */
314 void CL_NewDlight (float x, float y, float z, float radius, float time)
315 {
316  cdlight_t *dl;
317 
318  dl = CL_AllocFreeDlight ();
319  dl->origin[0] = x;
320  dl->origin[1] = y;
321  dl->origin[2] = z;
322  dl->radius = radius;
323  dl->die = cl.time + time;
324 }
325 
326 
327 /*
328 ===============
329 CL_RunDLights
330 
331 ===============
332 */
333 void CL_RunDLights (void)
334 {
335  int i;
336  cdlight_t *dl;
337 
338  dl = cl_dlights;
339  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
340  {
341  if (!dl->radius)
342  continue;
343 
344  if (dl->die < cl.time)
345  {
346  dl->radius = 0;
347  return;
348  }
349  dl->radius -= cls.frametime*dl->decay;
350  if (dl->radius < 0)
351  dl->radius = 0;
352  }
353 }
354 
355 /*
356 ==============
357 CL_ParseMuzzleFlash
358 ==============
359 */
361 {
362  vec3_t fv, rv;
363  cdlight_t *dl;
364  int i, weapon;
365  centity_t *pl;
366  int silenced;
367  float volume;
368  char soundname[64];
369 
371  if (i < 1 || i >= MAX_EDICTS)
372  Com_Error (ERR_DROP, "CL_ParseMuzzleFlash: bad entity");
373 
374  weapon = MSG_ReadByte (&net_message);
375  silenced = weapon & MZ_SILENCED;
376  weapon &= ~MZ_SILENCED;
377 
378  pl = &cl_entities[i];
379 
380  dl = CL_AllocDlight (i);
381  VectorCopy (pl->current.origin, dl->origin);
382  AngleVectors (pl->current.angles, fv, rv, NULL);
383  VectorMA (dl->origin, 18, fv, dl->origin);
384  VectorMA (dl->origin, 16, rv, dl->origin);
385  if (silenced)
386  dl->radius = 100 + (rand()&31);
387  else
388  dl->radius = 200 + (rand()&31);
389  dl->minlight = 32;
390  dl->die = cl.time; // + 0.1;
391 
392  if (silenced)
393  volume = 0.2;
394  else
395  volume = 1;
396 
397  switch (weapon)
398  {
399  case MZ_BLASTER:
400  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
401  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/blastf1a.wav"), volume, ATTN_NORM, 0);
402  break;
403  case MZ_BLUEHYPERBLASTER:
404  dl->color[0] = 0;dl->color[1] = 0;dl->color[2] = 1;
405  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/hyprbf1a.wav"), volume, ATTN_NORM, 0);
406  break;
407  case MZ_HYPERBLASTER:
408  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
409  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/hyprbf1a.wav"), volume, ATTN_NORM, 0);
410  break;
411  case MZ_MACHINEGUN:
412  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0.5;
413  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
414  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
415  break;
416  case MZ_SHOTGUN:
417  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0.5;
418  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/shotgf1b.wav"), volume, ATTN_NORM, 0);
419  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/shotgr1b.wav"), volume, ATTN_NORM, 0.1);
420  break;
421  case MZ_SSHOTGUN:
422  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0.5;
423  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/sshotf1b.wav"), volume, ATTN_NORM, 0);
424  break;
425  case MZ_CHAINGUN1:
426  dl->radius = 200 + (rand()&31);
427  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.25;
428  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
429  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
430  break;
431  case MZ_CHAINGUN2:
432  dl->radius = 225 + (rand()&31);
433  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.1;
434  dl->die = cl.time + 0.1; // long delay
435  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
436  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
437  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
438  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.05);
439  break;
440  case MZ_CHAINGUN3:
441  dl->radius = 250 + (rand()&31);
442  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0.25;
443  dl->die = cl.time + 0.1; // long delay
444  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
445  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0);
446  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
447  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.033);
448  Com_sprintf(soundname, sizeof(soundname), "weapons/machgf%ib.wav", (rand() % 5) + 1);
449  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound(soundname), volume, ATTN_NORM, 0.066);
450  break;
451  case MZ_RAILGUN:
452  dl->color[0] = cl_railred->value/255;
453  dl->color[1] = cl_railgreen->value/255;
454  dl->color[2] = cl_railblue->value/255;
455  dl->die += 10000;
456  dl->decay = 100;
457  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/railgf1a.wav"), volume, ATTN_NORM, 0);
458  break;
459  case MZ_ROCKET:
460  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
461  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/rocklf1a.wav"), volume, ATTN_NORM, 0);
462  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/rocklr1b.wav"), volume, ATTN_NORM, 0.1);
463  break;
464  case MZ_GRENADE:
465  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
466  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), volume, ATTN_NORM, 0);
467  S_StartSound (NULL, i, CHAN_AUTO, S_RegisterSound("weapons/grenlr1b.wav"), volume, ATTN_NORM, 0.1);
468  break;
469  case MZ_BFG:
470  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
471  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/bfg__f1y.wav"), volume, ATTN_NORM, 0);
472  break;
473 
474  case MZ_LOGIN:
475  dl->color[0] = 0;dl->color[1] = 1; dl->color[2] = 0;
476  dl->die = cl.time + 1.0;
477  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
478  CL_LogoutEffect (pl->current.origin, weapon);
479  break;
480  case MZ_LOGOUT:
481  dl->color[0] = 1;dl->color[1] = 0; dl->color[2] = 0;
482  dl->die = cl.time + 1.0;
483  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
484  CL_LogoutEffect (pl->current.origin, weapon);
485  break;
486  case MZ_RESPAWN:
487  dl->color[0] = 1;dl->color[1] = 1; dl->color[2] = 0;
488  dl->die = cl.time + 1.0;
489  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/grenlf1a.wav"), 1, ATTN_NORM, 0);
490  CL_LogoutEffect (pl->current.origin, weapon);
491  break;
492  // RAFAEL
493  case MZ_PHALANX:
494  dl->color[0] = 1;dl->color[1] = 0.5; dl->color[2] = 0.5;
495  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/plasshot.wav"), volume, ATTN_NORM, 0);
496  break;
497  // RAFAEL
498  case MZ_IONRIPPER:
499  dl->color[0] = 1;dl->color[1] = 0.5; dl->color[2] = 0.5;
500  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/rippfire.wav"), volume, ATTN_NORM, 0);
501  break;
502 
503 // ======================
504 // PGM
505  case MZ_ETF_RIFLE:
506  dl->color[0] = 0.9;dl->color[1] = 0.7;dl->color[2] = 0;
507  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/nail1.wav"), volume, ATTN_NORM, 0);
508  break;
509  case MZ_SHOTGUN2:
510  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
511  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/shotg2.wav"), volume, ATTN_NORM, 0);
512  break;
513  case MZ_HEATBEAM:
514  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
515  dl->die = cl.time + 100;
516 // S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/bfg__l1a.wav"), volume, ATTN_NORM, 0);
517  break;
518  case MZ_BLASTER2:
519  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
520  // FIXME - different sound for blaster2 ??
521  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/blastf1a.wav"), volume, ATTN_NORM, 0);
522  break;
523  case MZ_TRACKER:
524  dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
525  S_StartSound (NULL, i, CHAN_WEAPON, S_RegisterSound("weapons/disint2.wav"), volume, ATTN_NORM, 0);
526  break;
527  case MZ_NUKE1:
528  dl->color[0] = 1;dl->color[1] = 0;dl->color[2] = 0;
529  dl->die = cl.time + 100;
530  break;
531  case MZ_NUKE2:
532  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
533  dl->die = cl.time + 100;
534  break;
535  case MZ_NUKE4:
536  dl->color[0] = 0;dl->color[1] = 0;dl->color[2] = 1;
537  dl->die = cl.time + 100;
538  break;
539  case MZ_NUKE8:
540  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 1;
541  dl->die = cl.time + 100;
542  break;
543 // PGM
544 // ======================
545  }
546 }
547 
548 
549 /*
550 ==============
551 CL_ParseMuzzleFlash2
552 ==============
553 */
555 {
556  int ent;
557  vec3_t origin;
558  int flash_number;
559  cdlight_t *dl;
561  char soundname[64];
562 
563  ent = MSG_ReadShort (&net_message);
564  if (ent < 1 || ent >= MAX_EDICTS)
565  Com_Error (ERR_DROP, "CL_ParseMuzzleFlash2: bad entity");
566 
567  flash_number = MSG_ReadByte (&net_message);
568 
569  // locate the origin
571  origin[0] = cl_entities[ent].current.origin[0] + forward[0] * monster_flash_offset[flash_number][0] + right[0] * monster_flash_offset[flash_number][1];
572  origin[1] = cl_entities[ent].current.origin[1] + forward[1] * monster_flash_offset[flash_number][0] + right[1] * monster_flash_offset[flash_number][1];
573  origin[2] = cl_entities[ent].current.origin[2] + forward[2] * monster_flash_offset[flash_number][0] + right[2] * monster_flash_offset[flash_number][1] + monster_flash_offset[flash_number][2];
574 
575  dl = CL_AllocDlight (ent);
576  VectorCopy (origin, dl->origin);
577  dl->radius = 200 + (rand()&31);
578  dl->minlight = 32;
579  dl->die = cl.time; // + 0.1;
580 
581  switch (flash_number)
582  {
596  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
597  CL_GunSmokeEffect (origin, vec3_origin);
598  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
599  //CL_SmokeAndFlash(origin);
600  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
601  break;
602 
611  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
612  CL_GunSmokeEffect (origin, vec3_origin);
613  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
614  //CL_SmokeAndFlash(origin);
615  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck3.wav"), 1, ATTN_NORM, 0);
616  break;
617 
626  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
627  CL_GunSmokeEffect (origin, vec3_origin);
628  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
629  //CL_SmokeAndFlash(origin);
630  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck2.wav"), 1, ATTN_NORM, 0);
631  break;
632 
640  case MZ2_TURRET_MACHINEGUN: // PGM
641  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
642 
643  CL_GunSmokeEffect (origin, vec3_origin);
644  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
645  //CL_SmokeAndFlash(origin);
646  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
647  break;
648 
654  case MZ2_CARRIER_MACHINEGUN_L1: // PMM
655  case MZ2_CARRIER_MACHINEGUN_L2: // PMM
656  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
657 
658  CL_GunSmokeEffect (origin, vec3_origin);
659  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
660  //CL_SmokeAndFlash(origin);
661  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NONE, 0);
662  break;
663 
672  case MZ2_TURRET_BLASTER: // PGM
673  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
674  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck2.wav"), 1, ATTN_NORM, 0);
675  break;
676 
677  case MZ2_FLYER_BLASTER_1:
678  case MZ2_FLYER_BLASTER_2:
679  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
680  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("flyer/flyatck3.wav"), 1, ATTN_NORM, 0);
681  break;
682 
683  case MZ2_MEDIC_BLASTER_1:
684  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
685  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("medic/medatck1.wav"), 1, ATTN_NORM, 0);
686  break;
687 
688  case MZ2_HOVER_BLASTER_1:
689  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
690  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("hover/hovatck1.wav"), 1, ATTN_NORM, 0);
691  break;
692 
693  case MZ2_FLOAT_BLASTER_1:
694  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
695  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("floater/fltatck1.wav"), 1, ATTN_NORM, 0);
696  break;
697 
706  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
707  CL_GunSmokeEffect (origin, vec3_origin);
708  //CL_SmokeAndFlash(origin);
709  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck1.wav"), 1, ATTN_NORM, 0);
710  break;
711 
712  case MZ2_TANK_BLASTER_1:
713  case MZ2_TANK_BLASTER_2:
714  case MZ2_TANK_BLASTER_3:
715  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
716  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
717  break;
718 
738  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
739  CL_GunSmokeEffect (origin, vec3_origin);
740  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
741  //CL_SmokeAndFlash(origin);
742  Com_sprintf(soundname, sizeof(soundname), "tank/tnkatk2%c.wav", 'a' + rand() % 5);
743  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound(soundname), 1, ATTN_NORM, 0);
744  break;
745 
746  case MZ2_CHICK_ROCKET_1:
747  case MZ2_TURRET_ROCKET: // PGM
748  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
749  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("chick/chkatck2.wav"), 1, ATTN_NORM, 0);
750  break;
751 
752  case MZ2_TANK_ROCKET_1:
753  case MZ2_TANK_ROCKET_2:
754  case MZ2_TANK_ROCKET_3:
755  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
756  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck1.wav"), 1, ATTN_NORM, 0);
757  break;
758 
762  case MZ2_BOSS2_ROCKET_1:
763  case MZ2_BOSS2_ROCKET_2:
764  case MZ2_BOSS2_ROCKET_3:
765  case MZ2_BOSS2_ROCKET_4:
767 // case MZ2_CARRIER_ROCKET_2:
768 // case MZ2_CARRIER_ROCKET_3:
769 // case MZ2_CARRIER_ROCKET_4:
770  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
771  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/rocket.wav"), 1, ATTN_NORM, 0);
772  break;
773 
778  dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
779  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck3.wav"), 1, ATTN_NORM, 0);
780  break;
781 
783  // PMM
784  case MZ2_CARRIER_RAILGUN:
785  case MZ2_WIDOW_RAIL:
786  // pmm
787  dl->color[0] = 0.5;dl->color[1] = 0.5;dl->color[2] = 1.0;
788  break;
789 
790 // --- Xian's shit starts ---
791  case MZ2_MAKRON_BFG:
792  dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
793  //S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/bfg_fire.wav"), 1, ATTN_NORM, 0);
794  break;
795 
813  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
814  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/blaster.wav"), 1, ATTN_NORM, 0);
815  break;
816 
823  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
824  CL_GunSmokeEffect (origin, vec3_origin);
825  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
826  //CL_SmokeAndFlash(origin);
827  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("boss3/xfire.wav"), 1, ATTN_NORM, 0);
828  break;
829 
836  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
837  CL_GunSmokeEffect (origin, vec3_origin);
838  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
839  //CL_SmokeAndFlash(origin);
840  break;
841 
842  case MZ2_JORG_BFG_1:
843  dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
844  break;
845 
851  case MZ2_CARRIER_MACHINEGUN_R1: // PMM
852  case MZ2_CARRIER_MACHINEGUN_R2: // PMM
853 
854  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
855 
856  CL_GunSmokeEffect (origin, vec3_origin);
857  //CL_ParticleEffect (origin, vec3_origin, 0, 40);
858  //CL_SmokeAndFlash(origin);
859  break;
860 
861 // ======
862 // ROGUE
863  case MZ2_STALKER_BLASTER:
865  case MZ2_MEDIC_BLASTER_2:
866  case MZ2_WIDOW_BLASTER:
886  case MZ2_WIDOW_BLASTER_0:
894  case MZ2_WIDOW_RUN_1:
895  case MZ2_WIDOW_RUN_2:
896  case MZ2_WIDOW_RUN_3:
897  case MZ2_WIDOW_RUN_4:
898  case MZ2_WIDOW_RUN_5:
899  case MZ2_WIDOW_RUN_6:
900  case MZ2_WIDOW_RUN_7:
901  case MZ2_WIDOW_RUN_8:
902  dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
903  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
904  break;
905 
906  case MZ2_WIDOW_DISRUPTOR:
907  dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
908  S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("weapons/disint2.wav"), 1, ATTN_NORM, 0);
909  break;
910 
912  case MZ2_WIDOW2_BEAMER_1:
913  case MZ2_WIDOW2_BEAMER_2:
914  case MZ2_WIDOW2_BEAMER_3:
915  case MZ2_WIDOW2_BEAMER_4:
916  case MZ2_WIDOW2_BEAMER_5:
928  dl->radius = 300 + (rand()&100);
929  dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
930  dl->die = cl.time + 200;
931  break;
932 // ROGUE
933 // ======
934 
935 // --- Xian's shit ends ---
936 
937  }
938 }
939 
940 
941 /*
942 ===============
943 CL_AddDLights
944 
945 ===============
946 */
947 void CL_AddDLights (void)
948 {
949  int i;
950  cdlight_t *dl;
951 
952  dl = cl_dlights;
953 
954  for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
955  {
956  if (!dl->radius)
957  continue;
958  V_AddLight (dl->origin, dl->radius,
959  dl->color[0], dl->color[1], dl->color[2]);
960  }
961 }
962 
963 
964 
965 /*
966 ==============================================================
967 
968 PARTICLE MANAGEMENT
969 
970 ==============================================================
971 */
972 
974 
977 
979  float angle0, float angle1, float angle2,
980  float org0, float org1, float org2,
981  float vel0, float vel1, float vel2,
982  float accel0, float accel1, float accel2,
983  float color0, float color1, float color2,
984  float colorvel0, float colorvel1, float colorvel2,
985  float alpha, float alphavel,
986  float size, float sizevel,
987  int image,
988  int flags,
989  void (*think)(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time),
990  qboolean thinknext)
991 {
992  int j;
993  cparticle_t *p = NULL;
994 
995  if (!free_particles)
996  return NULL;
997  p = free_particles;
998  free_particles = p->next;
999  p->next = active_particles;
1000  active_particles = p;
1001 
1002  p->start = p->time = cl.time;
1003 
1004  p->angle[0]=angle0;
1005  p->angle[1]=angle1;
1006  p->angle[2]=angle2;
1007 
1008  p->org[0]=org0;
1009  p->org[1]=org1;
1010  p->org[2]=org2;
1011 
1012  p->vel[0]=vel0;
1013  p->vel[1]=vel1;
1014  p->vel[2]=vel2;
1015 
1016  p->accel[0]=accel0;
1017  p->accel[1]=accel1;
1018  p->accel[2]=accel2;
1019 
1020  p->color[0]=color0;
1021  p->color[1]=color1;
1022  p->color[2]=color2;
1023 
1024  p->colorvel[0]=colorvel0;
1025  p->colorvel[1]=colorvel1;
1026  p->colorvel[2]=colorvel2;
1027 
1028  p->alpha=alpha;
1029  p->alphavel=alphavel;
1030  p->size=size;
1031  p->sizevel=sizevel;
1032 
1033  p->image=image;
1034  p->flags=flags;
1035 
1036  p->src_ent=0;
1037  p->dst_ent=0;
1038 
1039  if (think)
1040  p->think=think;
1041  else
1042  p->think=NULL;
1043  p->thinknext=thinknext;
1044 
1045  for (j=0;j<P_LIGHTS_MAX;j++)
1046  {
1047  cplight_t *plight = &p->lights[j];
1048  plight->isactive = false;
1049  plight->light = 0;
1050  plight->lightvel = 0;
1051  plight->lightcol[0] = 0;
1052  plight->lightcol[1] = 0;
1053  plight->lightcol[2] = 0;
1054  }
1055 
1056  return p;
1057 }
1058 
1060  float light, float lightvel,
1061  float lcol0, float lcol1, float lcol2)
1062 {
1063  int i;
1064 
1065  for (i=0; i<P_LIGHTS_MAX; i++)
1066  {
1067  cplight_t *plight = &p->lights[i];
1068  if (!plight->isactive)
1069  {
1070  plight->isactive = true;
1071  plight->light = light;
1072  plight->lightvel = lightvel;
1073  plight->lightcol[0] = lcol0;
1074  plight->lightcol[1] = lcol1;
1075  plight->lightcol[2] = lcol2;
1076  return;
1077  }
1078  }
1079 }
1080 
1081 /*
1082 ===============
1083 CL_ClearParticles
1084 ===============
1085 */
1087 {
1088  int i;
1089 
1090  free_particles = &particles[0];
1092 
1093  for (i=0 ;i<cl_numparticles ; i++)
1094  particles[i].next = &particles[i+1];
1096 }
1097 
1098 void pSplashThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time);
1099 
1100 /*
1101 ===============
1102 SWQ SPECIFIC STUFF...
1103 ===============
1104 */
1105 
1106 void CL_SpeedTrail (vec3_t start, vec3_t end)
1107 {
1108  cparticle_t *p;
1109  vec3_t move;
1110  vec3_t vec;
1111  float len, dec, frac;
1112 
1113  VectorCopy (start, move);
1114  VectorSubtract (end, start, vec);
1115  len = VectorNormalize (vec);
1116 
1117  dec = 4;
1118  VectorScale (vec, dec, vec);
1119 
1120  frac = len/100;
1121  if (frac>1)
1122  frac=1;
1123 
1124  while (len > 0)
1125  {
1126  len -= dec;
1127 
1128  p = setupParticle (
1129  random()*360, random()*15, 0,
1130  move[0] + crandom()*5.0, move[1] + crandom()*5.0, move[2] + crandom()*5.0,
1131  0, 0, 0,
1132  0, 0, 0,
1133  100, 175, 255,
1134  0, 0, 0,
1135  frac*0.5, -1.0 / (0.8+frand()*0.2),
1136  15.0+random()*15, -5 + random()*2.5,
1138  PART_SHADED,
1139  pRotateThink,true);
1140 
1141  VectorAdd (move, vec, move);
1142  }
1143 }
1144 
1145 void pStunRotateThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1146 {
1147  vec3_t angleVel;
1148 
1149 
1150 
1151  VectorSubtract(org, p->org, angleVel);
1152  VectorAdd(angle, angleVel, angle);
1153  VectorCopy(p->org, org);
1154 
1155  angle[YAW] = sin(angle[YAW])*30;
1156  angle[PITCH] = cos(angle[PITCH])*30;
1157 
1158  p->thinknext = true;
1159 }
1160 
1161 void CL_StunBlast (vec3_t pos, vec3_t color, float size)
1162 {
1163  int i;
1164 
1165  for (i=0;i<8;i++)
1166  {
1167  setupParticle (
1168  0, 0, 0,
1169  pos[0], pos[1], pos[2],
1170  crandom()*size, crandom()*size, crandom()*size,
1171  0, 0, 0,
1172  color[0], color[1], color[2],
1173  0, 0, 0,
1174  .5, -1 / (0.8+frand()*0.2),
1175  size, 0,
1177  0,
1178  0, false);
1179  }
1180 
1181  setupParticle (
1182  crandom()*360, crandom()*360, crandom()*360,
1183  pos[0], pos[1], pos[2],
1184  75, 300, 75,
1185  0, 0, 0,
1186  color[0], color[1], color[2],
1187  0, 0, 0,
1188  .75, -1 / (0.8+frand()*0.2),
1189  size, size*3,
1191  PART_ANGLED,
1192  pStunRotateThink, true);
1193 }
1194 
1195 void CL_LaserStun (vec3_t pos, vec3_t direction, vec3_t color, float size)
1196 {
1197  vec3_t dir, angles;
1198  int i;
1199 
1200  for (i=0;i<16;i++)
1201  {
1202  vectoangles2(direction, angles);
1203  angles[PITCH] += crandom()*15;
1204  angles[YAW] += crandom()*15;
1205  AngleVectors(angles, dir, NULL, NULL);
1206  setupParticle (
1207  dir[0]*5, dir[1]*5, dir[2]*5,
1208  pos[0], pos[1], pos[2],
1209  dir[0]*10*size, dir[1]*10*size, dir[2]*10*size,
1210  0, 0, 0,
1211  color[0], color[1], color[2],
1212  0, 0, 0,
1213  .5, -2.0 / (0.8+frand()*0.2),
1214  size/5.0, 0,
1216  PART_DIRECTION,
1217  0, false);
1218  }
1219 }
1220 
1221 void CL_ForceTrail (vec3_t start, vec3_t end, qboolean light, float size)
1222 {
1223  cparticle_t *p;
1224  vec3_t move;
1225  vec3_t vec;
1226  float len, dec, length, frac;
1227  int i=0;
1228 
1229  VectorCopy (start, move);
1230  VectorSubtract (end, start, vec);
1231  length = len = VectorNormalize (vec);
1232 
1233  dec = 1 + size/5;
1234  VectorScale (vec, dec, vec);
1235 
1236  while (len > 0)
1237  {
1238  len -= dec; i++;
1239  frac = len/length;
1240 
1241  if (light)
1242  p = setupParticle (
1243  random()*360, random()*15, 0,
1244  move[0], move[1], move[2],
1245  0, 0, 0,
1246  0, 0, 0,
1247  150, 200, 255,
1248  0, 0, 0,
1249  1, -2.0 / (0.8+frand()*0.2),
1250  size, size,
1252  0,
1253  pRotateThink,true);
1254  else
1255  p = setupParticle (
1256  random()*360, random()*15, 0,
1257  move[0], move[1], move[2],
1258  0, 0, 0,
1259  0, 0, 0,
1260  255, 255, 255,
1261  0, 0, 0,
1262  1, -2.0 / (0.8+frand()*0.2),
1263  size, size,
1265  0,
1266  pRotateThink,true);
1267 
1268  VectorAdd (move, vec, move);
1269  }
1270 }
1271 
1272 /*
1273 ===============
1274 CL_FlameTrail -- DDAY SPECIFIC STUFF...
1275 ===============
1276 */
1277 
1279 {
1280  cparticle_t *p;
1281  vec3_t move;
1282  vec3_t vec;
1283  float len, dec, length, frac;
1284  int i=0;
1285 
1286  VectorCopy (start, move);
1287  VectorSubtract (end, start, vec);
1288  length = len = VectorNormalize (vec);
1289 
1290  dec = 1;
1291  VectorScale (vec, dec, vec);
1292 
1293  while (len > 0)
1294  {
1295  len -= dec; i++;
1296  frac = len/length;
1297 
1298  p = setupParticle (
1299  random()*360, random()*15, 0,
1300  move[0], move[1], move[2],
1301  0, 0, 0,
1302  0, 0, 0,
1303  40 + 215*frac, 100, 255 - 215*frac,
1304  0, 0, 0,
1305  1, -2.0 / (0.8+frand()*0.2),
1306  2.5 + 2.5*frac, 0,
1308  0,
1309  pRotateThink,true);
1310 
1311  VectorAdd (move, vec, move);
1312  }
1313 }
1314 
1315 void CL_InfernoTrail (vec3_t start, vec3_t end, float size)
1316 {
1317  vec3_t move;
1318  vec3_t vec;
1319  float len, dec, size2 = size * size;
1320 
1321  VectorCopy (start, move);
1322  VectorSubtract (end, start, vec);
1323  len = VectorNormalize (vec);
1324 
1325  dec = (20.0*size2+1);
1326  VectorScale (vec, dec, vec);
1327 
1328  while (len > 0)
1329  {
1330  len -= dec;
1331 
1332  setupParticle (
1333  random()*360, random()*45, 0,
1334  move[0], move[1], move[2],
1335  0, 0, 0,
1336  0, 0, 0,
1337  255, 255, 255,
1338  0, -100, -200,
1339  1, -1.0 / (0.8+frand()*0.2),
1340  1 + 20.0*size2, 5 + 50.0 * size2,
1341  //1 + 50.0*size2*(random()*0.25 + .75), 0,
1343  0,
1344  pRotateThink,true);
1345 
1346  VectorAdd (move, vec, move);
1347  }
1348 }
1349 
1350 
1351 /*void CL_FlameBurst (vec3_t org, float size)
1352 {
1353  int i;
1354 
1355  for (i=0; i<16; i++)
1356  setupParticle (
1357  random()*360, random()*180, 0,
1358  org[0] + crandom(), org[1] + crandom(), org[2] + crandom(),
1359  crandom() * size * 0.1, crandom() * size * 0.1, crandom() * size * 0.1,
1360  0, 0, 0,
1361  255, 255, 255,
1362  0, -50, -100,
1363  1, -1.5 / (0.8+frand()*0.2),
1364  size, size,
1365  particle_inferno,
1366  0,
1367  pRotateThink,true);
1368 }*/
1369 
1370 void CL_FlameTrail (vec3_t start, vec3_t end, float size)
1371 {
1372  cparticle_t *p;
1373  vec3_t move;
1374  vec3_t vec;
1375  float len, dec;
1376  int i=0;
1377 
1378  VectorCopy (start, move);
1379  VectorSubtract (end, start, vec);
1380  len = VectorNormalize (vec);
1381 
1382  dec = (20.0*size+1);
1383  VectorScale (vec, dec, vec);
1384 
1385  while (len > 0)
1386  {
1387  len -= dec; i++;
1388 
1389  p = setupParticle (
1390  random()*360, random()*15, 0,
1391  move[0] + crand()*3*size, move[1] + crand()*3*size, move[2] + crand()*3*size,
1392  crand()*size, crand()*size, crand()*size,
1393  0, 0, 0,
1394  255, 255, 255,
1395  0, 0, 0,
1396  1, -2.0 / (0.8+frand()*0.2),
1397  5 + size*5, 175.0 * size,
1399  0,
1400  pRotateThink,true);
1401 
1402  if (p)
1403  addParticleLight (p,
1404  50+size*75, 0,
1405  0.5+random()*0.5, 0.5, 0.1);
1406 
1407  VectorAdd (move, vec, move);
1408  }
1409 
1410  if (size == 0)
1411  {
1412  VectorSubtract (start, end, vec);
1413  len = VectorNormalize (vec);
1414  VectorScale (vec, 25, vec);
1415  VectorAdd(vec, start, vec);
1416 
1417  CL_BlueFlameTrail(start, vec);
1418  }
1419 
1420 }
1421 
1422 void CL_Flame (vec3_t start)
1423 {
1424  cparticle_t *p;
1425 
1426 
1427  p = setupParticle (
1428  random()*360, random()*15, 0,
1429  start[0], start[1], start[2],
1430  crand()*10.0, crand()*10.0, random()*100.0,
1431  0, 0, 0,
1432  255, 255, 255,
1433  0, 0, 0,
1434  1, -2.0 / (0.8+frand()*0.2),
1435  10, -10,
1437  0,
1438  pRotateThink,true);
1439 
1440  if (p)
1441  addParticleLight (p,
1442  20 + random()*20.0, 0,
1443  0.5+random()*0.5, 0.5, 0.1); //weak big
1444  if (p)
1445  addParticleLight (p,
1446  250.0, 0,
1447  0.01, 0.01, 0.01);
1448 }
1449 
1450 /*
1451 ===============
1452 CL_BlasterTracer -- MOD SPECIFIC STUFF...
1453 ===============
1454 */
1455 
1456 void CL_Tracer (vec3_t origin, vec3_t angle, int red, int green, int blue, float len, float size)
1457 {
1458  vec3_t dir;
1459 
1460  AngleVectors (angle, dir, NULL, NULL);
1461  VectorScale(dir, len,dir);
1462 
1463  setupParticle (
1464  dir[0], dir[1], dir[2],
1465  origin[0], origin[1], origin[2],
1466  0, 0, 0,
1467  0, 0, 0,
1468  red, green, blue,
1469  0, 0, 0,
1470  DIV254BY255, INSTANT_PARTICLE,
1471  size, 0,
1473  PART_DIRECTION|PART_TRANS,
1474  NULL,0);
1475 }
1476 
1477 void CL_Shield (vec3_t origin, float angle, int red, int green, int blue, float size, int times)
1478 {
1479  int i;
1480 
1481  for (i=0; i<times; i++)
1482  setupParticle (
1483  0, 0, angle,
1484  origin[0], origin[1], origin[2],
1485  0, 0, 0,
1486  0, 0, 0,
1487  red, green, blue,
1488  0, 0, 0,
1489  DIV254BY255, INSTANT_PARTICLE,
1490  size, 0,
1492  PART_DEPTHHACK_MID,
1493  NULL,0);
1494 }
1495 
1496 void CL_BlasterTracer (vec3_t origin, vec3_t angle, int red, int green, int blue, float len, float size)
1497 {
1498  int i;
1499  vec3_t dir;
1500 
1501  AngleVectors (angle, dir, NULL, NULL);
1502  VectorScale(dir, len,dir);
1503 
1504  for (i=0;i<3;i++)
1505  setupParticle (
1506  dir[0], dir[1], dir[2],
1507  origin[0], origin[1], origin[2],
1508  0, 0, 0,
1509  0, 0, 0,
1510  red, green, blue,
1511  0, 0, 0,
1512  DIV254BY255, INSTANT_PARTICLE,
1513  size, 0,
1515  PART_DIRECTION,
1516  NULL,0);
1517 }
1518 
1519 void CL_BlasterSplash (vec3_t origin, int red, int green, int blue, float size)
1520 {
1521  int i;
1522  for (i=0;i<16;i++)
1523  setupParticle (
1524  origin[0], origin[1], origin[2],
1525  origin[0] + crandom()*size, origin[1] + crandom()*size, origin[2] + crandom()*size,
1526  0, 0, 0,
1527  0, 0, 0,
1528  red, green, blue,
1529  0, 0, 0,
1530  DIV254BY255, INSTANT_PARTICLE,
1531  size*0.5f, 0,
1533  PART_BEAM,
1534  NULL,0);
1535 }
1536 
1537 /*
1538 ===============
1539 CL_LightningBeam
1540 ===============
1541 */
1542 
1543 void CL_LightningBeam(vec3_t start, vec3_t end, int srcEnt, int dstEnt, float size)
1544 {
1545  cparticle_t *list;
1546  cparticle_t *p=NULL;
1547 
1548  for (list=active_particles ; list ; list=list->next)
1549  if (list->src_ent == srcEnt && list->dst_ent == dstEnt && list->image == particle_lightning)
1550  {
1551  p=list;
1552  p->start = p->time = cl.time;
1553  VectorCopy(start, p->angle);
1554  VectorCopy(end, p->org);
1555 
1556  return;
1557  }
1558 
1559  p = setupParticle (
1560  start[0], start[1], start[2],
1561  end[0], end[1], end[2],
1562  0, 0, 0,
1563  0, 0, 0,
1564  255, 255, 255,
1565  0, 0, 0,
1566  1, -2,
1567  size, 0,
1569  PART_LIGHTNING,
1570  0, false);
1571 
1572  if (!p)
1573  return;
1574 
1575  p->src_ent=srcEnt;
1576  p->dst_ent=dstEnt;
1577 }
1578 
1579 void CL_LightningFlare (vec3_t start, int srcEnt, int dstEnt)
1580 {
1581  cparticle_t *list;
1582  cparticle_t *p=NULL;
1583 
1584  for (list=active_particles ; list ; list=list->next)
1585  if (list->src_ent == srcEnt && list->dst_ent == dstEnt && list->image == particle_lightflare)
1586  {
1587  p = list;
1588  p->start = p->time = cl.time;
1589  VectorCopy(start, p->org);
1590  return;
1591  }
1592 
1593  p = setupParticle (
1594  0, 0, 0,
1595  start[0], start[1], start[2],
1596  0, 0, 0,
1597  0, 0, 0,
1598  255, 255, 255,
1599  0, 0, 0,
1600  1, -2.5,
1601  15, 0,
1603  0,
1604  0, false);
1605 
1606  if (!p)
1607  return;
1608 
1609  p->src_ent=srcEnt;
1610  p->dst_ent=dstEnt;
1611 }
1612 
1613 /*
1614 ===============
1615 CL_Explosion_Particle
1616 
1617 BOOM!
1618 ===============
1619 */
1620 
1621 void pExplosionThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1622 {
1623 
1624  if (*alpha>.85)
1625  *image = particle_rexplosion1;
1626  else if (*alpha>.7)
1627  *image = particle_rexplosion2;
1628  else if (*alpha>.5)
1629  *image = particle_rexplosion3;
1630  else if (*alpha>.4)
1631  *image = particle_rexplosion4;
1632  else if (*alpha>.25)
1633  *image = particle_rexplosion5;
1634  else if (*alpha>.1)
1635  *image = particle_rexplosion6;
1636  else
1637  *image = particle_rexplosion7;
1638 
1639  *alpha *= 3.0;
1640 
1641  if (*alpha > 1.0)
1642  *alpha = 1;
1643 
1644  p->thinknext = true;
1645 }
1646 
1647 #define EXPLODESTAININTESITY 75
1648 void CL_Explosion_Particle (vec3_t org, float size, qboolean large, qboolean rocket)
1649 {
1650  cparticle_t *p;
1651 
1652  if (large)
1653  {
1654  if (size)
1655  {
1657  }
1658  else
1659  {
1660  if (rocket)
1662  else
1664  }
1665 
1666  p = setupParticle (
1667  0, 0, 0,
1668  org[0], org[1], org[2],
1669  0, 0, 0,
1670  0, 0, 0,
1671  255, 255, 255,
1672  0, 0, 0,
1673  1, (0.5+random()*0.5) * (rocket)? -2 : -1.5,
1674  (size!=0)?size:(150-(!rocket)?75:0), 0,
1675  particle_rexplosion1, //whatever :p
1676  PART_DEPTHHACK_SHORT,
1677  pExplosionThink, true);
1678 
1679  if (p)
1680  { //smooth color blend :D
1681  float lightsize = (large)? 1.0 : 0.75;
1682 
1683  addParticleLight (p,
1684  lightsize*250, 0,
1685  1, 1, 1);
1686  addParticleLight (p,
1687  lightsize*265, 0,
1688  1, 0.75, 0);
1689  addParticleLight (p,
1690  lightsize*285, 0,
1691  1, 0.25, 0);
1692  addParticleLight (p,
1693  lightsize*300, 0,
1694  1, 0, 0);
1695  }
1696  }
1697 /* else //volumizers
1698  {
1699  setupParticle (
1700  0, 0, 0,
1701  org[0], org[1], org[2],
1702  0, 0, 0,
1703  0, 0, 0,
1704  255, 175, 100,
1705  0, 0, 0,
1706  1, 1 * (rocket)? -1.5 : -1.25,
1707  (size!=0)?size:(150-(!rocket)?75:0), 0,
1708  particle_inferno,
1709  0,
1710  NULL,0);
1711  }
1712  */
1713 }
1714 
1715 
1716 void pDisruptExplosionThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1717 {
1718 
1719  if (*alpha>.66666)
1720  *image = particle_dexplosion1;
1721  else if (*alpha>.33333)
1722  *image = particle_dexplosion2;
1723  else
1724  *image = particle_dexplosion3;
1725 
1726  *alpha *= 3.0;
1727 
1728  if (*alpha > 1.0)
1729  *alpha = 1;
1730 
1731  p->thinknext = true;
1732 }
1733 
1735 {
1736  float alphastart = 1,
1737  alphadecel = -5;
1738  cparticle_t *p;
1739 
1741 
1742  //now add main sprite
1743  {
1744  p = setupParticle (
1745  0, 0, 0,
1746  org[0], org[1], org[2],
1747  0, 0, 0,
1748  0, 0, 0,
1749  255, 255, 255,
1750  0, 0, 0,
1751  alphastart, alphadecel,
1752  size, 0,
1754  PART_DEPTHHACK_SHORT,
1755  pDisruptExplosionThink, true);
1756 
1757  if (p)
1758  {
1759  //float lightsize = size/150.0;
1760 
1761  addParticleLight (p,
1762  size*1.0f, 0,
1763  1, 1, 1);
1764  addParticleLight (p,
1765  size*1.25f, 0,
1766  0.75, 0, 1);
1767  addParticleLight (p,
1768  size*1.65f, 0,
1769  0.25, 0, 1);
1770  addParticleLight (p,
1771  size*1.9f, 0,
1772  0, 0, 1);
1773  }
1774  }
1775  /*
1776  alphastart /= 10.0;
1777  alphadecel /= 10.0;
1778 
1779  //now make volumizers...
1780  for (i=0;i<256;i++)
1781  {
1782  int size2 = size*2;
1783 
1784  setupParticle (
1785  0, 0, 0,
1786  org[0]+ ((rand()%size2)-size)*0.1, org[1]+ ((rand()%size2)-size)*0.1, org[2]+ ((rand()%size2)-size)*0.1,
1787  ((rand()%size2)-size)*2.0, ((rand()%size2)-size)*2.0, ((rand()%size2)-size)*2.0,
1788  0, 0, 0,
1789  100, 100, 200,
1790  0, 0, 0,
1791  alphastart, alphadecel,
1792  size/3.0, -10,
1793  particle_smoke,
1794  PART_DIRECTION,
1795  pSplashThink,true);
1796  }*/
1797 }
1798 
1799 /*
1800 ===============
1801 CL_WeatherFx
1802 
1803 weather effects
1804 ===============
1805 */
1806 
1807 //drop of blood
1808 void CL_BloodSmack (vec3_t org);
1809 
1810 void pRainSplashThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1811 {
1812  //NO THINK!!!!
1813 }
1814 
1815 void pWeatherFXThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1816 {
1817  float length;
1818  int i;
1819  vec3_t len;
1820 
1821  VectorSubtract(p->angle, org, len);
1822  {
1823  float time1, time2;
1824 
1825  time1 = *time;
1826  time2 = time1*time1;
1827 
1828  for (i=0;i<2;i++)
1829  angle[i] = 0.2*(p->vel[i]*time1 + (p->accel[i])*time2);
1830  angle[2] = 0.2*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
1831 
1832  length = VectorNormalize(angle);
1833 
1834  if (length>*size*10.0)
1835  length = *size*10.0;
1836 
1837  VectorScale(angle, length, angle);
1838  }
1839 
1840  //now to trace for impact...
1841  {
1842  trace_t trace = CL_Trace (p->oldorg, org, 0.1, 1);
1843  if (trace.fraction < 1.0)//delete and stain...
1844  {
1845  switch ((int)p->temp)
1846  {
1847  case 0: //RAIN
1848 
1849  //PARTICLE RECONSTRUCTION
1850  {
1851  vectoanglerolled(trace.plane.normal, rand()%360, p->angle);
1852  VectorCopy(trace.endpos, p->org);
1853  VectorClear(p->vel);
1854  VectorClear(p->accel);
1855  p->image = particle_smoke;
1856  p->flags = PART_SHADED|PART_ANGLED;
1857  p->alpha = *alpha;
1858  p->alphavel = -0.5;
1859  p->start = cl.time;
1860  p->think = pRainSplashThink;
1861  p->size = *size;
1862  p->sizevel = 10 + 10*random();
1863  }
1864  break;
1865  case 1: //SNOW
1866  default:
1867  //kill this particle
1868  p->alpha = 0;
1869 
1870  *alpha=0;
1871  *size=0;
1872  break;
1873  }
1874 
1875  }
1876  }
1877 
1878 
1879  VectorCopy(org, p->oldorg);
1880 
1881  p->thinknext = true;
1882 }
1883 
1884 void CL_WeatherFx (vec3_t org, vec3_t vec, vec3_t color, int type, float size, float time)
1885 {
1886  cparticle_t *p;
1887  int image, flags=0;
1888 
1889  switch (type)
1890  {
1891  case 0: //RAIN
1892  image = particle_generic;
1893  flags = PART_SHADED|PART_DIRECTION|PART_GRAVITY;
1894  break;
1895  case 1: //SNOW
1896  image = particle_generic;
1897  break;
1898  default:
1899  image = particle_generic;
1900  flags = PART_TRANS|PART_SHADED|PART_DIRECTION|PART_GRAVITY;
1901  break;
1902  }
1903 
1904  p = setupParticle (
1905  0 ,0 ,0,
1906  org[0], org[1], org[2],
1907  vec[0], vec[1], vec[2],
1908  0 ,0 ,0,
1909  color[0], color[1], color[2],
1910  0, 0, 0,
1911  1.0, -1 / (1 + time),
1912  size, 0,
1913  image,
1914  flags,
1915  pWeatherFXThink,true);
1916 
1917  if (p)
1918  p->temp = type;
1919 }
1920 
1921 
1922 /*
1923 ===============
1924 CL_BloodHit
1925 
1926 blood spray
1927 ===============
1928 */
1929 
1930 #define MAXBLEEDSIZE 5
1931 
1932 //drop of blood
1933 void pBloodThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1934 {
1935  float length;
1936  int i;
1937  vec3_t len;
1938 
1939  VectorSubtract(p->angle, org, len);
1940  {
1941  float time1, time2;
1942 
1943  time1 = *time;
1944  time2 = time1*time1;
1945 
1946  for (i=0;i<2;i++)
1947  angle[i] = 0.2*(p->vel[i]*time1 + (p->accel[i])*time2);
1948  angle[2] = 0.2*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
1949 
1950  length = VectorNormalize(angle);
1951  if (length>MAXBLEEDSIZE) length = MAXBLEEDSIZE;
1952  VectorScale(angle, length, angle);
1953  }
1954 
1955  //now to trace for impact...
1956  {
1957  trace_t trace = CL_Trace (p->oldorg, org, length*0.5, 1);
1958  if (trace.fraction < 1.0)//delete and stain...
1959  {
1960  re.AddStain(org, 5+*alpha*10, 0, -50**alpha ,-50**alpha);
1961 
1962  *alpha=0;
1963  *size=0;
1964  p->alpha = 0;
1965  }
1966  }
1967 
1968 
1969  VectorCopy(org, p->oldorg);
1970 
1971  p->thinknext = true;
1972 }
1973 
1975 {
1976  setupParticle (
1977  crand()*180, crand()*100, 0,
1978  org[0], org[1], org[2],
1979  0, 0, 0,
1980  0, 0, 0,
1981  255, 255, 255,
1982  0, 0, 0,
1983  1.0, -0.5 / (0.5 + frand()*0.3),
1984  10, 0,
1986  PART_TRANS|PART_SHADED,
1987  pRotateThink,true);
1988 }
1989 
1990 void CL_BloodBleed (vec3_t org, vec3_t pos, vec3_t dir)
1991 {
1992  setupParticle (
1993  org[0], org[1], org[2],
1994  org[0] + ((rand()&7)-4) + dir[0], org[1] + ((rand()&7)-4) + dir[1], org[2] + ((rand()&7)-4) + dir[2],
1995  pos[0]*(random()*3+5)*1.0, pos[1]*(random()*3+5)*1.0, pos[2]*(random()*3+5)*1.0,
1996  0, 0, 0,
1997  255, 255, 255,
1998  0, 0, 0,
1999  1.0, -0.25 / (0.5 + frand()*0.3),
2000  MAXBLEEDSIZE*0.5f, 0,
2002  PART_TRANS|PART_SHADED|PART_DIRECTION|PART_GRAVITY,
2003  pBloodThink,true);
2004 }
2005 
2006 void CL_BloodHit (vec3_t org, vec3_t dir)
2007 {
2008  vec3_t move;
2009  int i;
2010 
2011  VectorScale(dir, 3, move);
2012 
2013  switch ((int)(cl_blood->value))
2014  {
2015  case 1: //bleed
2016  for (i=0;i<3;i++)
2017  CL_BloodBleed (org, move, dir);
2018  break;
2019  case 2: //splat & bleed
2020  CL_BloodSmack(org);
2021  for (i=0;i<5;i++)
2022  CL_BloodBleed (org, move, dir);
2023  break;
2024  case 3: //gore
2025  for (i=0;i<20;i++)
2026  CL_BloodBleed (org, move, dir);
2027  break;
2028  default: //splat
2029  CL_BloodSmack(org);
2030  break;
2031  }
2032 
2033 
2034 }
2035 
2036 /*
2037 ===============
2038 CL_ParticleEffect
2039 
2040 Wall impact puffs
2041 ===============
2042 */
2043 void CL_ParticleEffect (vec3_t org, vec3_t dir, int color8, int count)
2044 {
2045  int i;
2046  float d;
2047  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
2048 
2049  for (i=0 ; i<count ; i++)
2050  {
2051  d = rand()&31;
2052  setupParticle (
2053  0, 0, 0,
2054  org[0] + ((rand()&7)-4) + d*dir[0], org[1] + ((rand()&7)-4) + d*dir[1], org[2] + ((rand()&7)-4) + d*dir[2],
2055  crand()*20, crand()*20, crand()*20,
2056  0, 0, 0,
2057  color[0], color[1], color[2],
2058  0, 0, 0,
2059  1.0, -1.0 / (0.5 + frand()*0.3),
2060  1, 0,
2062  PART_GRAVITY,
2063  NULL,0);
2064  }
2065 }
2066 
2067 /*
2068 ===============
2069 CL_ParticleEffectSplash
2070 
2071 Water Splashing
2072 ===============
2073 */
2074 #define colorAdd 25
2075 #define SplashSize 7.5
2076 void pSplashThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
2077 {
2078  int i;
2079  vec3_t len;
2080  VectorSubtract(p->angle, org, len);
2081 
2082 // *size *= (float)(SplashSize/VectorLength(len)) * 0.5/((4-*size));
2083 // if (*size > SplashSize)
2084 // *size = SplashSize;
2085 
2086  //setting up angle for sparks
2087  {
2088  float time1, time2;
2089 
2090  time1 = *time;
2091  time2 = time1*time1;
2092 
2093  for (i=0;i<2;i++)
2094  angle[i] = 0.5*(p->vel[i]*time1 + (p->accel[i])*time2);
2095  angle[2] = 0.5*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
2096  }
2097 
2098  p->thinknext = true;
2099 }
2100 
2101 void CL_ParticleEffectSplash (vec3_t org, vec3_t dir, int color8, int count)
2102 {
2103  int i;
2104  float d;
2105  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
2106 
2107  for (i=0 ; i<count ; i++)
2108  {
2109  d = rand()&5;
2110  setupParticle (
2111  org[0], org[1], org[2],
2112  org[0]+d*dir[0], org[1]+d*dir[1], org[2]+d*dir[2],
2113  dir[0]*40 + crand()*10, dir[1]*40 + crand()*10, dir[2]*40 + crand()*10,
2114  0, 0, 0,
2115  color[0], color[1], color[2],
2116  0, 0, 0,
2117  1, -1.0 / (0.5 + frand()*0.3),
2118  0.5, 0,
2120  PART_GRAVITY|PART_DIRECTION /*|PART_TRANS|PART_SHADED*/,
2121  pSplashThink,true);
2122  }
2123 }
2124 
2125 
2126 /*
2127 ===============
2128 CL_ParticleEffect2
2129 ===============
2130 */
2131 void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color8, int count)
2132 {
2133  int i;
2134  float d;
2135  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
2136 
2137  for (i=0 ; i<count ; i++)
2138  {
2139  d = rand()&7;
2140  setupParticle (
2141  0, 0, 0,
2142  org[0]+((rand()&7)-4)+d*dir[0], org[1]+((rand()&7)-4)+d*dir[1], org[2]+((rand()&7)-4)+d*dir[2],
2143  crand()*20, crand()*20, crand()*20,
2144  0, 0, 0,
2145  color[0] + colorAdd, color[1] + colorAdd, color[2] + colorAdd,
2146  0, 0, 0,
2147  1, -1.0 / (0.5 + frand()*0.3),
2148  1, 0,
2150  PART_GRAVITY,
2151  NULL,0);
2152  }
2153 }
2154 
2155 
2156 // RAFAEL
2157 /*
2158 ===============
2159 CL_ParticleEffect3
2160 ===============
2161 */
2162 
2163 
2164 void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color8, int count)
2165 {
2166  int i;
2167  float d;
2168  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
2169 
2170  for (i=0 ; i<count ; i++)
2171  {
2172  d = rand()&7;
2173  setupParticle (
2174  0, 0, 0,
2175  org[0]+((rand()&7)-4)+d*dir[0], org[1]+((rand()&7)-4)+d*dir[1], org[2]+((rand()&7)-4)+d*dir[2],
2176  crand()*20, crand()*20, crand()*20,
2177  0, 0, 0,
2178  color[0] + colorAdd, color[1] + colorAdd, color[2] + colorAdd,
2179  0, 0, 0,
2180  1, -1.0 / (0.5 + frand()*0.3),
2181  1, 0,
2183  PART_GRAVITY,
2184  NULL, false);
2185  }
2186 }
2187 
2188 /*
2189 ===============
2190 CL_ParticleEffectSparks
2191 ===============
2192 */
2193 
2194 void pSparksThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
2195 {
2196  int i;
2197 
2198  //setting up angle for sparks
2199  {
2200  float time1, time2;
2201 
2202  time1 = *time;
2203  time2 = time1*time1;
2204 
2205  for (i=0;i<2;i++)
2206  angle[i] = 0.75*(p->vel[i]*time1 + (p->accel[i])*time2);
2207  angle[2] = 0.75*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
2208  }
2209 
2210  p->thinknext = true;
2211 }
2212 
2213 void CL_ParticleEffectSparks (vec3_t org, vec3_t dir, vec3_t color, int count)
2214 {
2215  int i;
2216  float d;
2217  for (i=0 ; i<count ; i++)
2218  {
2219  d = rand()&7;
2220  setupParticle (
2221  0, 0, 0,
2222  org[0]+((rand()&3)-2), org[1]+((rand()&3)-2), org[2]+((rand()&3)-2),
2223  //crandom()*20 + dir[0]*75,crand()*20 + dir[1]*75,
2224  //crand()*20 + dir[2]*75,
2225  20+dir[0]*75,20+dir[1]*75,20+dir[2]*75,
2226  0, 0, 0,
2227  color[0], color[1], color[2],
2228  0, 0, 0,
2229  0.75, -1.5 / (0.5 + frand()*0.3),
2230  0.5, 0,
2232  PART_GRAVITY|PART_DIRECTION,
2233  pSparksThink,true);
2234  }
2235 }
2236 
2237 /*
2238 ===============
2239 CL_ParticleFootPrint
2240 ===============
2241 */
2242 
2243 void CL_ParticleFootPrint (vec3_t org, vec3_t angle, float size, vec3_t color)
2244 {
2245  float alpha = DIV254BY255;
2246 
2247  setupParticle (
2248  angle[0], angle[1], angle[2],
2249  org[0], org[1], org[2],
2250  0, 0, 0,
2251  0, 0, 0,
2252  color[0], color[1], color[2],
2253  0, 0, 0,
2254  alpha, -.025,
2255  size, 0,
2257  PART_TRANS|PART_ANGLED|PART_SHADED,
2258  NULL, false);
2259 }
2260 
2261 /*
2262 ===============
2263 CL_ParticleBulletDecal
2264 ===============
2265 */
2266 
2267 void CL_ParticleBulletDecal (vec3_t org, vec3_t dir, float size)
2268 {
2269  vec3_t ang, angle;
2270 
2271  //return;
2272 
2273  VectorScale(dir, -1, angle);
2274  vectoanglerolled(angle, rand()%360, ang);
2275 
2276  setupParticle (
2277  ang[0], ang[1], ang[2],
2278  org[0]+dir[0], org[1]+dir[1], org[2]+dir[2],
2279  0, 0, 0,
2280  0, 0, 0,
2281  0, 0, 0,
2282  0, 0, 0,
2283  DIV254BY255, -.1,
2284  size, 0,
2286  PART_TRANS|PART_ANGLED|PART_SHADED,
2287  NULL, false);
2288 }
2289 
2290 /*
2291 ===============
2292 CL_TeleporterParticles
2293 ===============
2294 */
2296 {
2297  int i;
2298 
2299  for (i=0 ; i<8 ; i++)
2300  {
2301  setupParticle (
2302  0, 0, 0,
2303  ent->origin[0]-16+(rand()&31), ent->origin[1]-16+(rand()&31), ent->origin[2]-16+(rand()&31),
2304  crand()*14, crand()*14, crand()*14,
2305  0, 0, 0,
2306  200+rand()*50, 200+rand()*50, 200+rand()*50,
2307  0, 0, 0,
2308  1, -0.5,
2309  1, 0,
2311  PART_GRAVITY,
2312  NULL,0);
2313  }
2314 }
2315 
2316 
2317 /*
2318 ===============
2319 CL_LogoutEffect
2320 
2321 ===============
2322 */
2323 void CL_LogoutEffect (vec3_t org, int type)
2324 {
2325  int i;
2326  vec3_t color;
2327 
2328  for (i=0 ; i<500 ; i++)
2329  {
2330  if (type == MZ_LOGIN)// green
2331  {
2332  color[0] = 20;
2333  color[1] = 200;
2334  color[2] = 20;
2335  }
2336  else if (type == MZ_LOGOUT)// red
2337  {
2338  color[0] = 200;
2339  color[1] = 20;
2340  color[2] = 20;
2341  }
2342  else// yellow
2343  {
2344  color[0] = 200;
2345  color[1] = 200;
2346  color[2] = 20;
2347  }
2348 
2349  setupParticle (
2350  0, 0, 0,
2351  org[0] - 16 + frand()*32, org[1] - 16 + frand()*32, org[2] - 24 + frand()*56,
2352  crand()*20, crand()*20, crand()*20,
2353  0, 0, 0,
2354  color[0], color[1], color[2],
2355  0, 0, 0,
2356  1, -1.0 / (1.0 + frand()*0.3),
2357  1, 0,
2359  PART_GRAVITY,
2360  NULL,0);
2361  }
2362 }
2363 
2364 
2365 /*
2366 ===============
2367 CL_ItemRespawnParticles
2368 
2369 ===============
2370 */
2372 {
2373  int i;
2374 
2375  for (i=0 ; i<64 ; i++)
2376  {
2377  setupParticle (
2378  0, 0, 0,
2379  org[0] + crand()*8, org[1] + crand()*8, org[2] + crand()*8,
2380  crand()*8, crand()*8, crand()*8,
2381  0, 0, PARTICLE_GRAVITY*0.2,
2382  0, 150+rand()*25, 0,
2383  0, 0, 0,
2384  1, -1.0 / (1.0 + frand()*0.3),
2385  1, 0,
2387  PART_GRAVITY,
2388  NULL,0);
2389  }
2390 }
2391 
2392 
2393 /*
2394 ===============
2395 CL_ExplosionParticles
2396 ===============
2397 */
2398 
2399 void pExplosionSparksThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
2400 {
2401  int i;
2402 
2403  //setting up angle for sparks
2404  {
2405  float time1, time2;
2406 
2407  time1 = *time;
2408  time2 = time1*time1;
2409 
2410  for (i=0;i<2;i++)
2411  angle[i] = 0.25*(p->vel[i]*time1 + (p->accel[i])*time2);
2412  angle[2] = 0.25*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
2413 
2414  }
2415 
2416  p->thinknext = true;
2417 }
2418 
2419 // This is buggy, not sure why... -bb 10/08/02
2420 /*
2421 void CL_ExplosionParticles (vec3_t org, float scale)
2422 {
2423  vec3_t vel;
2424  int i;
2425 
2426  printf("%d %d %d %g\n", org[0], org[1], org[2], scale);
2427  for (i=0 ; i<256 ; i++)
2428  {
2429  VectorSet(vel, crandom(), crandom(), crandom());
2430  VectorNormalize(vel);
2431  VectorScale(vel, scale*75.0f, vel);
2432 
2433  setupParticle (
2434  0, 0, 0,
2435  org[0] + ((rand()%32)-16), org[1] + ((rand()%32)-16), org[2] + ((rand()%32)-16),
2436  vel[0], vel[1], vel[2],
2437  0, 0, 0,
2438  255, 255, 255,
2439  0, -200, -400,
2440  1, -0.8 / (0.5 + frand()*0.3),
2441  scale, -scale,
2442  particle_blaster,
2443  PART_GRAVITY|PART_DIRECTION,//PART_SPARK,
2444  pExplosionSparksThink, true);
2445  }
2446 }
2447 */
2449 {
2450  int i, j;
2451  cparticle_t *p;
2452 
2453  for (i=0 ; i<256 ; i++)
2454  {
2455  if (!free_particles)
2456  return;
2457  p = free_particles;
2458  free_particles = p->next;
2459  p->next = active_particles;
2460  active_particles = p;
2461 
2462  p->time = cl.time;
2463  p->color[0] = 255;
2464  p->color[1] = 0;
2465  p->color[2] = rand() & 7;
2466  for (j=0 ; j<3 ; j++)
2467  {
2468  p->org[j] = org[j] + ((rand()%32)-16);
2469  p->vel[j] = (rand()%384)-192;
2470  }
2471 
2472  p->accel[0] = p->accel[1] = 0;
2473  p->accel[2] = -PARTICLE_GRAVITY;
2474  p->alpha = 1.0;
2475 
2476  p->alphavel = -0.8 / (0.5 + frand()*0.3);
2477  }
2478 }
2479 /*
2480 ===============
2481 CL_BigTeleportParticles
2482 ===============
2483 */
2485 {
2486  int i, index;
2487  float angle, dist;
2488  static int colortable0[4] = {10,50,150,50};
2489  static int colortable1[4] = {150,150,50,10};
2490  static int colortable2[4] = {50,10,10,150};
2491 
2492  for (i=0 ; i<4096 ; i++)
2493  {
2494 
2495  index = rand()&3;
2496  angle = M_PI*2*(rand()&1023)/1023.0;
2497  dist = rand()&31;
2498  setupParticle (
2499  0, 0, 0,
2500  org[0]+cos(angle)*dist, org[1] + sin(angle)*dist,org[2] + 8 + (rand()%90),
2501  cos(angle)*(70+(rand()&63)),sin(angle)*(70+(rand()&63)),-100 + (rand()&31),
2502  -cos(angle)*100, -sin(angle)*100,PARTICLE_GRAVITY*4,
2503  colortable0[index], colortable1[index], colortable2[index],
2504  0, 0, 0,
2505  1, -0.3 / (0.5 + frand()*0.3),
2506  1, 0.3 / (0.5 + frand()*0.3),
2508  0,
2509  NULL,0);
2510  }
2511 }
2512 
2513 
2514 /*
2515 ===============
2516 CL_BlasterParticles
2517 
2518 Wall impact puffs
2519 ===============
2520 */
2521 #define pBlasterMaxSize 5
2522 void pBlasterThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
2523 {
2524  vec3_t len;
2525  VectorSubtract(p->angle, org, len);
2526 
2527  *size *= (float)(pBlasterMaxSize/VectorLength(len)) * 1.0/((4-*size));
2528  if (*size > pBlasterMaxSize)
2529  *size = pBlasterMaxSize;
2530 
2531  p->thinknext = true;
2532 }
2533 
2535 {
2536  int i;
2537  float d;
2538  float speed = .75;
2539 
2540  for (i=0 ; i<count ; i++)
2541  {
2542  d = rand()&5;
2543  setupParticle (
2544  org[0], org[1], org[2],
2545  org[0]+((rand()&5)-2)+d*dir[0], org[1]+((rand()&5)-2)+d*dir[1], org[2]+((rand()&5)-2)+d*dir[2],
2546  (dir[0]*75 + crand()*20)*speed, (dir[1]*75 + crand()*20)*speed, (dir[2]*75 + crand()*20)*speed,
2547  0, 0, 0,
2548  255, 150, 50,
2549  0, -90, -30,
2550  1, -1.0 / (0.5 + frand()*0.3),
2551  4, -1,
2553  PART_GRAVITY,
2554  pBlasterThink,true);
2555  }
2556 }
2557 
2558 /*
2559 ===============
2560 CL_BlasterTrail
2561 
2562 ===============
2563 */
2564 void CL_BlasterTrail (vec3_t start, vec3_t end)
2565 {
2566  vec3_t move;
2567  vec3_t vec;
2568  float len;
2569  int dec;
2570 
2571  VectorCopy (start, move);
2572  VectorSubtract (end, start, vec);
2573  len = VectorNormalize (vec);
2574 
2575  dec = 4;
2576  VectorScale (vec, dec, vec);
2577 
2578  // FIXME: this is a really silly way to have a loop
2579  while (len > 0)
2580  {
2581  len -= dec;
2582 
2583  setupParticle (
2584  0, 0, 0,
2585  move[0] + crand(), move[1] + crand(), move[2] + crand(),
2586  crand()*5, crand()*5, crand()*5,
2587  0, 0, 0,
2588  255, 150, 50,
2589  0, -90, -30,
2590  1, -1.0 / (0.5 + frand()*0.3),
2591  4, -6,
2593  0,
2594  NULL,0);
2595 
2596  VectorAdd (move, vec, move);
2597  }
2598 }
2599 
2600 /*
2601 ===============
2602 CL_QuadTrail
2603 
2604 ===============
2605 */
2606 void CL_QuadTrail (vec3_t start, vec3_t end)
2607 {
2608  vec3_t move;
2609  vec3_t vec;
2610  float len;
2611  int dec;
2612 
2613  VectorCopy (start, move);
2614  VectorSubtract (end, start, vec);
2615  len = VectorNormalize (vec);
2616 
2617  dec = 5;
2618  VectorScale (vec, 5, vec);
2619 
2620  while (len > 0)
2621  {
2622  len -= dec;
2623 
2624  setupParticle (
2625  0, 0, 0,
2626  move[0] + crand()*16, move[1] + crand()*16, move[2] + crand()*16,
2627  crand()*5, crand()*5, crand()*5,
2628  0, 0, 0,
2629  0, 0, 200,
2630  0, 0, 0,
2631  1, -1.0 / (0.8+frand()*0.2),
2632  1, 0,
2634  0,
2635  NULL,0);
2636 
2637  VectorAdd (move, vec, move);
2638  }
2639 }
2640 
2641 /*
2642 ===============
2643 CL_FlagTrail
2644 
2645 ===============
2646 */
2647 void CL_FlagTrail (vec3_t start, vec3_t end, qboolean isred)
2648 {
2649  vec3_t move;
2650  vec3_t vec;
2651  float len;
2652  int dec;
2653 
2654  VectorCopy (start, move);
2655  VectorSubtract (end, start, vec);
2656  len = VectorNormalize (vec);
2657 
2658  dec = 5;
2659  VectorScale (vec, 5, vec);
2660 
2661  while (len > 0)
2662  {
2663  len -= dec;
2664 
2665  setupParticle (
2666  0, 0, 0,
2667  move[0] + crand()*16, move[1] + crand()*16, move[2] + crand()*16,
2668  crand()*5, crand()*5, crand()*5,
2669  0, 0, 0,
2670  (isred)?255:0, 0, (!isred)?255:0,
2671  0, 0, 0,
2672  1, -1.0 / (0.8+frand()*0.2),
2673  1, 0,
2675  0,
2676  NULL,0);
2677 
2678  VectorAdd (move, vec, move);
2679  }
2680 }
2681 
2682 /*
2683 ===============
2684 CL_DiminishingTrail
2685 
2686 ===============
2687 */
2688 void CL_DiminishingTrail (vec3_t start, vec3_t end, centity_t *old, int flags)
2689 {
2690  vec3_t move;
2691  vec3_t vec;
2692  float len;
2693  float dec;
2694  float orgscale;
2695  float velscale;
2696 
2697  VectorCopy (start, move);
2698  VectorSubtract (end, start, vec);
2699  len = VectorNormalize (vec);
2700 
2701  dec = (flags & EF_ROCKET) ? 10 : 2;
2702  VectorScale (vec, dec, vec);
2703 
2704  if (old->trailcount > 900)
2705  {
2706  orgscale = 4;
2707  velscale = 15;
2708  }
2709  else if (old->trailcount > 800)
2710  {
2711  orgscale = 2;
2712  velscale = 10;
2713  }
2714  else
2715  {
2716  orgscale = 1;
2717  velscale = 5;
2718  }
2719 
2720  while (len > 0)
2721  {
2722  len -= dec;
2723 
2724  if (!free_particles)
2725  return;
2726 
2727  if (flags & EF_ROCKET)
2728  {
2729  setupParticle (
2730  crand()*180, crand()*100, 0,
2731  move[0], move[1], move[2],
2732  crand()*5, crand()*5, crand()*5,
2733  0, 0, 5,
2734  255, 255, 255,
2735  -50, -50, -50,
2736  0.75, -0.5,
2737  5, 12.5,
2739  PART_TRANS|PART_SHADED,
2740  pRotateThink, true);
2741  }
2742  else
2743  {
2744  // drop less particles as it flies
2745  if ((rand()&1023) < old->trailcount)
2746  {
2747  if (flags & EF_GIB)
2748  {
2749  setupParticle (
2750  0, 0, random()*360,
2751  move[0] + crand()*orgscale, move[1] + crand()*orgscale, move[2] + crand()*orgscale,
2752  crand()*velscale, crand()*velscale, crand()*velscale,
2753  0, 0, 0,
2754  255, 255, 255,
2755  0, 0, 0,
2756  0.75, -0.75 / (1+frand()*0.4),
2757  1+3*frand(), -1,
2759  PART_TRANS|PART_GRAVITY|PART_SHADED,
2760  NULL,0);
2761  }
2762  else if (flags & EF_GREENGIB)
2763  {
2764  setupParticle (
2765  0, 0, 0,
2766  move[0] + crand()*orgscale, move[1] + crand()*orgscale, move[2] + crand()*orgscale,
2767  crand()*velscale, crand()*velscale, crand()*velscale,
2768  0, 0, 0,
2769  0, 255, 0,
2770  0, 0, 0,
2771  0, -1.0 / (1+frand()*0.4),
2772  5, -1,
2774  PART_GRAVITY|PART_SHADED,
2775  NULL,0);
2776  }
2777  else
2778  {
2779  setupParticle (
2780  crand()*180, crand()*50, 0,
2781  move[0] + crand()*orgscale, move[1] + crand()*orgscale, move[2] + crand()*orgscale,
2782  crand()*velscale, crand()*velscale, crand()*velscale,
2783  0, 0, 20,
2784  255, 255, 255,
2785  0, 0, 0,
2786  0.5, -0.5,
2787  5, 5,
2789  PART_TRANS|PART_SHADED,
2790  pRotateThink,true);
2791  }
2792  }
2793 
2794  old->trailcount -= 5;
2795  if (old->trailcount < 100)
2796  old->trailcount = 100;
2797  }
2798 
2799  VectorAdd (move, vec, move);
2800  }
2801 }
2802 
2804 {
2805  float d;
2806 
2807  // this rotate and negat guarantees a vector
2808  // not colinear with the original
2809  right[1] = -forward[0];
2810  right[2] = forward[1];
2811  right[0] = forward[2];
2812 
2813  d = DotProduct (right, forward);
2814  VectorMA (right, -d, forward, right);
2817 }
2818 
2819 /*
2820 ===============
2821 CL_RocketTrail
2822 
2823 ===============
2824 */
2825 void CL_RocketTrail (vec3_t start, vec3_t end, centity_t *old)
2826 {
2827  vec3_t move;
2828  vec3_t vec;
2829  float len, totallen;
2830  float dec;
2831 
2832  // smoke
2833  CL_DiminishingTrail (start, end, old, EF_ROCKET);
2834 
2835  // fire
2836  VectorCopy (start, move);
2837  VectorSubtract (end, start, vec);
2838  totallen = len = VectorNormalize (vec);
2839 
2840  dec = 1;
2841  VectorScale (vec, dec, vec);
2842 
2843  while (len > 0)
2844  {
2845  len -= dec;
2846 
2847  if (!free_particles)
2848  return;
2849 
2850  //flame from rocket
2851  setupParticle (
2852  0, 0, 0,
2853  move[0],move[1],move[2],
2854  vec[0], vec[1], vec[2],
2855  0, 0, 0,
2856  255, 200, 100,
2857  0, 0, -200,
2858  1, -15,
2859  2.0*(2-len/totallen), -15,
2861  0,
2862  NULL,0);
2863 
2864  //falling particles
2865  if ( (rand()&7) == 0)
2866  {
2867  setupParticle (
2868  0, 0, 0,
2869  move[0] + crand()*5, move[1] + crand()*5, move[2] + crand()*5,
2870  crand()*20, crand()*20, crand()*20,
2871  0, 0, 20,
2872  255, 255, 255,
2873  0, -100, -200,
2874  1, -2.0 / (1+frand()*0.2),
2875  1, -3,
2877  PART_GRAVITY,
2878  NULL,0);
2879  }
2880  VectorAdd (move, vec, move);
2881  }
2882 }
2883 
2884 /*
2885 ===============
2886 CL_RailTrail
2887 
2888 ===============
2889 */
2890 #define RAILSPACE 1.0
2891 
2892 void CL_RailSprial (vec3_t start, vec3_t end)
2893 {
2894  vec3_t move;
2895  vec3_t vec;
2896  float len;
2897  vec3_t right, up;
2898  int i;
2899  float d, c, s;
2900  vec3_t dir;
2901 
2902  VectorCopy (start, move);
2903  VectorSubtract (end, start, vec);
2904  len = VectorNormalize (vec);
2905 
2906  MakeNormalVectors (vec, right, up);
2907 
2908  VectorScale(vec, RAILSPACE, vec);
2909 
2910 
2911  for (i=0 ; i<len ; i+=RAILSPACE)
2912  {
2913  d = i * 0.1;
2914  c = cos(d);
2915  s = sin(d);
2916 
2917  VectorScale (right, c, dir);
2918  VectorMA (dir, s, up, dir);
2919 
2920  setupParticle (
2921  0, 0, 0,
2922  move[0] + dir[0]*3, move[1] + dir[1]*3, move[2] + dir[2]*3,
2923  dir[0]*6, dir[1]*6, dir[2]*6,
2924  0, 0, 0,
2925  cl_railred->value, cl_railgreen->value, cl_railblue->value,
2926  0, 0, 0,
2927  1, -1.0,
2928  3*RAILSPACE, 0,
2930  0,
2931  NULL,0);
2932 
2933  VectorAdd (move, vec, move);
2934  }
2935 }
2936 
2937 void pDevRailThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
2938 {
2939  int i;
2940  vec3_t len;
2941  VectorSubtract(p->angle, org, len);
2942 
2943  *size *= (float)(SplashSize/VectorLength(len)) * 0.5/((4-*size));
2944  if (*size > SplashSize)
2945  *size = SplashSize;
2946 
2947  //setting up angle for sparks
2948  {
2949  float time1, time2;
2950 
2951  time1 = *time;
2952  time2 = time1*time1;
2953 
2954  for (i=0;i<2;i++)
2955  angle[i] = 3*(p->vel[i]*time1 + (p->accel[i])*time2);
2956  angle[2] = 3*(p->vel[2]*time1 + (p->accel[2]-PARTICLE_GRAVITY)*time2);
2957  }
2958 
2959  p->thinknext = true;
2960 }
2961 #define DEVRAILSTEPS 2
2962 void CL_DevRailTrail (vec3_t start, vec3_t end)
2963 {
2964  vec3_t move, last;
2965  vec3_t vec, point;
2966  float len;
2967  int dec, i=0;
2968 
2969  VectorCopy (start, move);
2970  VectorSubtract (end, start, vec);
2971  len = VectorNormalize (vec);
2972  VectorCopy(vec, point);
2973 
2974  dec = 4;
2975  VectorScale (vec, dec, vec);
2976 
2977  // FIXME: this is a really silly way to have a loop
2978  while (len > 0)
2979  {
2980  len -= dec;
2981  i++;
2982 
2983  VectorCopy (move, last);
2984  VectorAdd (move, vec, move);
2985 
2986  if (i>=DEVRAILSTEPS)
2987  {
2988  for (i=3;i>0;i--)
2989  setupParticle (
2990  last[0], last[1], last[2],
2991  move[0], move[1], move[2],
2992  0, 0, 0,
2993  0, 0, 0,
2994  cl_railred->value, cl_railgreen->value, cl_railblue->value,
2995  0, -90, -30,
2996  1, -.75,
2997  dec*DEVRAILSTEPS*TWOTHIRDS, 0,
2998  particle_beam,
2999  PART_BEAM,
3000  NULL,0);
3001  }
3002 
3003  setupParticle (
3004  0, 0, 0,
3005  move[0], move[1], move[2],
3006  crand()*10, crand()*10, crand()*10+20,
3007  0, 0, 0,
3008  cl_railred->value, cl_railgreen->value, cl_railblue->value,
3009  0, 0, 0,
3010  1, -0.75 / (0.5 + frand()*0.3),
3011  2, -0.25,
3012  0,
3013  PART_GRAVITY|PART_DIRECTION,
3014  pDevRailThink,true);
3015 
3016  setupParticle (
3017  crand()*180, crand()*100, 0,
3018  move[0], move[1], move[2],
3019  crand()*10, crand()*10, crand()*10+20,
3020  0, 0, 5,
3021  255, 255, 255,
3022  0, 0, 0,
3023  0.25, -0.25,
3024  5, 10,
3026  PART_TRANS|PART_GRAVITY,
3027  pRotateThink, true);
3028  }
3029 }
3030 
3031 #define RAILTRAILSPACE 15
3032 void CL_RailTrail (vec3_t start, vec3_t end)
3033 {
3034  vec3_t move, last;
3035  vec3_t vec, point;
3036  int i;
3037  float len;
3038  vec3_t right, up;
3039  qboolean colored = (cl_railtype->value!=1);
3040 
3041  VectorCopy (start, move);
3042  VectorSubtract (end, start, vec);
3043  len = VectorNormalize (vec);
3044  VectorCopy (vec, point);
3045 
3046  MakeNormalVectors (vec, right, up);
3047  VectorScale (vec, (cl_railtype->value == 2)?RAILTRAILSPACE:RAILSPACE, vec);
3048  VectorCopy (start, move);
3049 
3050 
3051  if (cl_railtype->value == 3)
3052  {
3053  CL_DevRailTrail(start, end);
3054  return;
3055  }
3056 
3057  while (len > 0)
3058  {
3059  VectorCopy (move, last);
3060  VectorAdd (move, vec, move);
3061 
3062  if (cl_railtype->value == 2)
3063  {
3064  len -= RAILTRAILSPACE;
3065 
3066  for (i=0;i<3;i++)
3067  setupParticle (
3068  last[0], last[1], last[2],
3069  move[0], move[1], move[2],
3070  0, 0, 0,
3071  0, 0, 0,
3072  cl_railred->value, cl_railgreen->value, cl_railblue->value,
3073  0, 0, 0,
3074  1, -1.0,
3075  RAILTRAILSPACE*TWOTHIRDS, 0,
3076  particle_beam,
3077  PART_BEAM,
3078  NULL,0);
3079 
3080  }
3081  else
3082  {
3083  len -= RAILSPACE;
3084 
3085  setupParticle (
3086  0, 0, 0,
3087  move[0], move[1], move[2],
3088  0, 0, 0,
3089  0, 0, 0,
3090  (colored)?cl_railred->value:255, (colored)?cl_railgreen->value:255, (colored)?cl_railblue->value:255,
3091  0, 0, 0,
3092  1, -1.0,
3093  3*RAILSPACE, 0,
3095  0,
3096  NULL,0);
3097  }
3098  }
3099 
3100  if (cl_railtype->value == 1)
3101  CL_RailSprial (start, end);
3102 }
3103 
3104 // RAFAEL
3105 /*
3106 ===============
3107 CL_IonripperTrail
3108 ===============
3109 */
3111 {
3112  vec3_t move, last;
3113  vec3_t vec, aim;
3114  float len;
3115  float dec;
3116  float overlap;
3117 
3118  VectorCopy (start, move);
3119  VectorSubtract (ent, start, vec);
3120  len = VectorNormalize (vec);
3121  VectorCopy(vec, aim);
3122 
3123  dec = len*0.2;
3124  if (dec<1)
3125  dec=1;
3126 
3127  overlap = dec*5.0;
3128 
3129  VectorScale (vec, dec, vec);
3130 
3131  while (len > 0)
3132  {
3133  len -= dec;
3134 
3135  VectorCopy(move, last);
3136  VectorAdd (move, vec, move);
3137 
3138  setupParticle (
3139  last[0], last[1], last[2],
3140  move[0]+aim[0]*overlap, move[1]+aim[1]*overlap, move[2]+aim[2]*overlap,
3141  0, 0, 0,
3142  0, 0, 0,
3143  255, 100, 0,
3144  0, 0, 0,
3145  0.5, -1.0 / (0.3 + frand() * 0.2),
3146  3, 3,
3148  PART_BEAM,
3149  NULL,0);
3150  }
3151 
3152  setupParticle (
3153  0, 0, 0,
3154  start[0], start[1], start[2],
3155  0, 0, 0,
3156  0, 0, 0,
3157  255, 100, 0,
3158  0, 0, 0,
3159  0.5, -1.0 / (0.3 + frand() * 0.2),
3160  3, 3,
3162  0,
3163  NULL,0);
3164 }
3165 
3166 
3167 /*
3168 ===============
3169 CL_BubbleTrail
3170 
3171 ===============
3172 */
3173 void CL_BubbleTrail (vec3_t start, vec3_t end)
3174 {
3175  vec3_t move;
3176  vec3_t vec;
3177  float len;
3178  int i;
3179  float dec;
3180 
3181  VectorCopy (start, move);
3182  VectorSubtract (end, start, vec);
3183  len = VectorNormalize (vec);
3184 
3185  dec = 32;
3186  VectorScale (vec, dec, vec);
3187 
3188  for (i=0 ; i<len ; i+=dec)
3189  {
3190 
3191  setupParticle (
3192  0, 0, 0,
3193  move[0]+crand()*2, move[1]+crand()*2, move[2]+crand()*2,
3194  crand()*5, crand()*5, crand()*5+6,
3195  0, 0, 0,
3196  255, 255, 255,
3197  0, 0, 0,
3198  0.75, -1.0 / (1 + frand() * 0.2),
3199  (frand()>0.25)? 1 : (frand()>0.5) ? 2 : (frand()>0.75) ? 3 : 4, 1,
3201  PART_TRANS|PART_SHADED,
3202  NULL,0);
3203 
3204  VectorAdd (move, vec, move);
3205  }
3206 }
3207 
3208 
3209 /*
3210 ===============
3211 CL_FlyParticles
3212 ===============
3213 */
3214 
3215 #define BEAMLENGTH 16
3216 void CL_FlyParticles (vec3_t origin, int count)
3217 {
3218  int i;
3219  float angle;
3220  float sr, sp, sy, cr, cp, cy;
3221  vec3_t forward;
3222  float dist = 64;
3223  float ltime;
3224 
3225 
3226  if (count > NUMVERTEXNORMALS)
3228 
3229  if (!avelocities[0][0])
3230  {
3231  for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
3232  avelocities[0][i] = (rand()&255) * 0.01;
3233  }
3234 
3235 
3236  ltime = (float)cl.time / 1000.0;
3237  for (i=0 ; i<count ; i+=2)
3238  {
3239  angle = ltime * avelocities[i][0];
3240  sy = sin(angle);
3241  cy = cos(angle);
3242  angle = ltime * avelocities[i][1];
3243  sp = sin(angle);
3244  cp = cos(angle);
3245  angle = ltime * avelocities[i][2];
3246  sr = sin(angle);
3247  cr = cos(angle);
3248 
3249  forward[0] = cp*cy;
3250  forward[1] = cp*sy;
3251  forward[2] = -sp;
3252 
3253  dist = sin(ltime + i)*64;
3254 
3255  setupParticle (
3256  0, 0, 0,
3257  origin[0] + bytedirs[i][0]*dist + forward[0]*BEAMLENGTH,origin[1] + bytedirs[i][1]*dist + forward[1]*BEAMLENGTH,
3258  origin[2] + bytedirs[i][2]*dist + forward[2]*BEAMLENGTH,
3259  0, 0, 0,
3260  0, 0, 0,
3261  0, 0, 0,
3262  0, 0, 0,
3263  1, -100,
3264  1+sin(i+ltime), 1,
3266  PART_TRANS,
3267  NULL,0);
3268  }
3269 }
3270 
3271 void CL_FlyEffect (centity_t *ent, vec3_t origin)
3272 {
3273  int n;
3274  int count;
3275  int starttime;
3276 
3277  if (ent->fly_stoptime < cl.time)
3278  {
3279  starttime = cl.time;
3280  ent->fly_stoptime = cl.time + 60000;
3281  }
3282  else
3283  {
3284  starttime = ent->fly_stoptime - 60000;
3285  }
3286 
3287  n = cl.time - starttime;
3288  if (n < 20000)
3289  count = n * 162 / 20000.0;
3290  else
3291  {
3292  n = ent->fly_stoptime - cl.time;
3293  if (n < 20000)
3294  count = n * 162 / 20000.0;
3295  else
3296  count = 162;
3297  }
3298 
3299  CL_FlyParticles (origin, count);
3300 }
3301 
3302 
3303 /*
3304 ===============
3305 CL_BfgParticles
3306 ===============
3307 */
3308 void pBFGThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
3309 {
3310  vec3_t len;
3311  VectorSubtract(p->angle, p->org, len);
3312 
3313  *size = (float)((300/VectorLength(len))*0.75);
3314 }
3315 
3316 #define BEAMLENGTH 16
3318 {
3319  int i;
3320  cparticle_t *p;
3321  float angle;
3322  float sr, sp, sy, cr, cp, cy;
3323  vec3_t forward;
3324  float dist = 64, dist2;
3325  vec3_t v;
3326  float ltime;
3327 
3328  if (!avelocities[0][0])
3329  {
3330  for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
3331  avelocities[0][i] = (rand()&255) * 0.01;
3332  }
3333 
3334 
3335  ltime = (float)cl.time / 1000.0;
3336  for (i=0 ; i<NUMVERTEXNORMALS ; i++)
3337  {
3338  angle = ltime * avelocities[i][0];
3339  sy = sin(angle);
3340  cy = cos(angle);
3341  angle = ltime * avelocities[i][1];
3342  sp = sin(angle);
3343  cp = cos(angle);
3344  angle = ltime * avelocities[i][2];
3345  sr = sin(angle);
3346  cr = cos(angle);
3347 
3348  forward[0] = cp*cy;
3349  forward[1] = cp*sy;
3350  forward[2] = -sp;
3351 
3352  dist2 = dist;
3353  dist = sin(ltime + i)*64;
3354 
3355  p = setupParticle (
3356  ent->origin[0], ent->origin[1], ent->origin[2],
3357  ent->origin[0] + bytedirs[i][0]*dist + forward[0]*BEAMLENGTH,ent->origin[1] + bytedirs[i][1]*dist + forward[1]*BEAMLENGTH,
3358  ent->origin[2] + bytedirs[i][2]*dist + forward[2]*BEAMLENGTH,
3359  0, 0, 0,
3360  0, 0, 0,
3361  50, 200*dist2, 20,
3362  0, 0, 0,
3363  1, -100,
3364  1, 1,
3366  0,
3367  pBFGThink, true);
3368 
3369  if (!p)
3370  return;
3371 
3372  VectorSubtract (p->org, ent->origin, v);
3373  dist = VectorLength(v) / 90.0;
3374  }
3375 }
3376 
3377 
3378 /*
3379 ===============
3380 CL_TrapParticles
3381 ===============
3382 */
3383 // RAFAEL
3385 {
3386  int colors[][3] =
3387  {
3388  {255, 200, 150},
3389  {255, 200, 100},
3390  {255, 200, 50},
3391  {0, 0, 0}
3392  };
3393  vec3_t move;
3394  vec3_t vec;
3395  vec3_t start, end;
3396  float len;
3397  int dec, index;
3398 
3399  ent->origin[2]-=14;
3400  VectorCopy (ent->origin, start);
3401  VectorCopy (ent->origin, end);
3402  end[2]+=64;
3403 
3404  VectorCopy (start, move);
3405  VectorSubtract (end, start, vec);
3406  len = VectorNormalize (vec);
3407 
3408  dec = 2.5;
3409  VectorScale (vec, dec, vec);
3410 
3411  // FIXME: this is a really silly way to have a loop
3412  while (len > 0)
3413  {
3414  len -= dec;
3415 
3416  index = rand()&3;
3417 
3418  setupParticle (
3419  0, 0, 0,
3420  move[0] + crand(), move[1] + crand(), move[2] + crand(),
3421  crand()*15, crand()*15, crand()*15,
3422  0, 0, PARTICLE_GRAVITY,
3423  colors[index][0], colors[index][1], colors[index][2],
3424  0, 0, 0,
3425  1, -1.0 / (0.3+frand()*0.2),
3426  3, -5,
3428  0,
3429  NULL,0);
3430 
3431  VectorAdd (move, vec, move);
3432  }
3433 
3434  {
3435 
3436  int i, j, k;
3437  float vel;
3438  vec3_t dir;
3439  vec3_t org;
3440 
3441 
3442  ent->origin[2]+=14;
3443  VectorCopy (ent->origin, org);
3444 
3445 
3446  for (i=-2 ; i<=2 ; i+=4)
3447  for (j=-2 ; j<=2 ; j+=4)
3448  for (k=-2 ; k<=4 ; k+=4)
3449  {
3450 
3451  dir[0] = j * 8;
3452  dir[1] = i * 8;
3453  dir[2] = k * 8;
3454 
3455  VectorNormalize (dir);
3456  vel = 50 + (rand()&63);
3457 
3458  index = rand()&3;
3459 
3460  setupParticle (
3461  0, 0, 0,
3462  org[0] + i + ((rand()&23) * crand()), org[1] + j + ((rand()&23) * crand()), org[2] + k + ((rand()&23) * crand()),
3463  dir[0]*vel, dir[1]*vel, dir[2]*vel,
3464  0, 0, 0,
3465  colors[index][0], colors[index][1], colors[index][2],
3466  0, 0, 0,
3467  1, -1.0 / (0.3+frand()*0.2),
3468  3, -10,
3470  PART_GRAVITY,
3471  NULL,0);
3472  }
3473  }
3474 }
3475 
3476 
3477 /*
3478 ===============
3479 CL_BFGExplosionParticles
3480 ===============
3481 */
3482 //FIXME combined with CL_ExplosionParticles
3484 {
3485  int i;
3486 
3487  for (i=0 ; i<256 ; i++)
3488  {
3489  setupParticle (
3490  0, 0, 0,
3491  org[0] + ((rand()%32)-16), org[1] + ((rand()%32)-16), org[2] + ((rand()%32)-16),
3492  (rand()%150)-75, (rand()%150)-75, (rand()%150)-75,
3493  0, 0, 0,
3494  200, 100+rand()*50, 0,
3495  0, 0, 0,
3496  1, -0.8 / (0.5 + frand()*0.3),
3497  10, -10,
3499  PART_GRAVITY,
3500  NULL,0);
3501  }
3502 }
3503 
3504 
3505 /*
3506 ===============
3507 CL_TeleportParticles
3508 
3509 ===============
3510 */
3511 
3512 void CL_MakeTeleportParticles (vec3_t org, float min, float max, float size,
3513  int red, int green, int blue, particle_type particleType)
3514 {
3515  cparticle_t *p;
3516  int i, j, k;
3517  float vel, resize = 1;
3518  vec3_t dir, temp;
3519 
3520  resize += size/10;
3521 
3522  for (i=-16 ; i<=16 ; i+=4)
3523  for (j=-16 ; j<=16 ; j+=4)
3524  for (k=min ; k<=max ; k+=4)
3525  {
3526  dir[0] = j*8;
3527  dir[1] = i*8;
3528  dir[2] = k*8;
3529 
3530  VectorNormalize (dir);
3531  vel = (rand()&63);
3532 
3533  p = setupParticle (
3534  0, 0, 0,
3535  org[0]+ (i+(rand()&3))*resize, org[1]+(j+(rand()&3))*resize, org[2]+(k+(rand()&3))*resize,
3536  dir[0]*vel, dir[1]*vel, dir[2]*(25 + vel),
3537  0, 0, 0,
3538  red, green, blue,
3539  0, 0, 0,
3540  1, -0.75 / (0.3 + (rand()&7) * 0.02),
3541  (random()*.25+.75)*size*resize, 0,
3542  particleType,
3543  PART_GRAVITY,
3544  NULL,0);
3545 
3546  if (!p)
3547  continue;
3548 
3549  VectorCopy(p->org, temp); temp[2] = org[2];
3550  VectorSubtract(org, temp, p->vel);
3551  p->vel[2]+=25;
3552 
3553  VectorScale(p->vel, 3, p->accel);
3554  }
3555 }
3556 
3558 {
3559  CL_MakeTeleportParticles (org, -16, 32,
3560  2.5, 255,255,200, particle_generic);
3561 }
3562 
3563 void CL_Disintegrate (vec3_t pos, int ent)
3564 {
3565  CL_MakeTeleportParticles (pos, -16, 24,
3566  7.5, 100, 100, 255, particle_smoke);
3567 }
3568 
3569 void CL_FlameBurst (vec3_t pos, float size)
3570 {
3571  CL_MakeTeleportParticles (pos, -16, 24,
3572  size, 255, 255, 255, particle_inferno);
3573 }
3574 
3575 
3576 void pLensFlareThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
3577 {
3578  angle[2] = anglemod(cl.refdef.viewangles[YAW]);
3579 
3580  p->thinknext = true;
3581 }
3582 
3583 void CL_LensFlare(vec3_t pos, vec3_t color, float size, float time)
3584 {
3585  setupParticle (
3586  0, 0, 0,
3587  pos[0], pos[1], pos[2],
3588  0, 0, 0,
3589  0, 0, 0,
3590  color[0], color[1], color[2],
3591  0, 0, 0,
3592  1, - 2.0f/time,
3593  size, 0,
3595  PART_LENSFLARE,
3596  pLensFlareThink, true);
3597 }
3598 
3599 /*
3600 ===============
3601 CL_AddParticles
3602 ===============
3603 */
3604 
3605 void CL_AddParticles (void)
3606 {
3607  cparticle_t *p, *next;
3608  float alpha, size, light;
3609  float time=0, time2;
3610  vec3_t org, color, angle;
3611  int i, image;
3612  cparticle_t *active, *tail;
3613 
3614  active = NULL;
3615  tail = NULL;
3616 
3617  for (p=active_particles ; p ; p=next)
3618  {
3619  next = p->next;
3620 
3621  // PMM - added INSTANT_PARTICLE handling for heat beam
3622  if (p->alphavel != INSTANT_PARTICLE)
3623  {
3624  //this fixes jumpy particles
3625  if (cl.time>p->time)
3626  p->time = cl.time;
3627 
3628  time = (p->time - p->start)*0.001;
3629  alpha = p->alpha + time*p->alphavel;
3630 
3631  if (alpha <= 0)
3632  { // faded out
3633  p->next = free_particles;
3634  free_particles = p;
3635  continue;
3636  }
3637  }
3638  else
3639  {
3640  alpha = p->alpha;
3641  }
3642 
3643  p->next = NULL;
3644  if (!tail)
3645  active = tail = p;
3646  else
3647  {
3648  tail->next = p;
3649  tail = p;
3650  }
3651 
3652  if (alpha > 1.0)
3653  alpha = 1;
3654 
3655  time2 = time*time;
3656  image = p->image;
3657 
3658  for (i=0;i<3;i++)
3659  {
3660  color[i] = p->color[i] + p->colorvel[i]*time;
3661  if (color[i]>255) color[i]=255;
3662  if (color[i]<0) color[i]=0;
3663 
3664  angle[i] = p->angle[i];
3665  org[i] = p->org[i] + p->vel[i]*time + p->accel[i]*time2;
3666  }
3667 
3668  if (p->flags&PART_GRAVITY)
3669  org[2]+=time2*-PARTICLE_GRAVITY;
3670 
3671  size = p->size + p->sizevel*time;
3672 
3673  for (i=0;i<P_LIGHTS_MAX;i++)
3674  {
3675  const cplight_t *plight = &p->lights[i];
3676  if (plight->isactive)
3677  {
3678  light = plight->light*alpha + plight->lightvel*time;
3679  V_AddLight (org, light, plight->lightcol[0], plight->lightcol[1], plight->lightcol[2]);
3680  }
3681  }
3682 
3683  if (p->thinknext && p->think)
3684  {
3685  p->thinknext=false;
3686  p->think(p, org, angle, &alpha, &size, &image, &time);
3687  }
3688 
3689  V_AddParticle (org, angle, color, alpha, size, image, p->flags);
3690 
3691  if (p->alphavel == INSTANT_PARTICLE)
3692  {
3693  p->alphavel = 0.0;
3694  p->alpha = 0.0;
3695  }
3696  }
3697 
3698  active_particles = active;
3699 }
3700 
3701 
3702 /*
3703 ==============
3704 CL_EntityEvent
3705 
3706 An entity has just been parsed that has an event value
3707 
3708 the female events are there for backwards compatability
3709 ==============
3710 */
3711 extern struct sfx_s *cl_sfx_footsteps[4];
3712 
3714 {
3715  switch (ent->event)
3716  {
3717  case EV_ITEM_RESPAWN:
3718  S_StartSound (NULL, ent->number, CHAN_WEAPON, S_RegisterSound("items/respawn1.wav"), 1, ATTN_IDLE, 0);
3720  break;
3721  case EV_PLAYER_TELEPORT:
3722  S_StartSound (NULL, ent->number, CHAN_WEAPON, S_RegisterSound("misc/tele1.wav"), 1, ATTN_IDLE, 0);
3724  break;
3725  case EV_FOOTSTEP:
3726  if (cl_footsteps->value)
3727  S_StartSound (NULL, ent->number, CHAN_BODY, cl_sfx_footsteps[rand()&3], 1, ATTN_NORM, 0);
3728  break;
3729  case EV_FALLSHORT:
3730  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("player/land1.wav"), 1, ATTN_NORM, 0);
3731  break;
3732  case EV_FALL:
3733  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("*fall2.wav"), 1, ATTN_NORM, 0);
3734  break;
3735  case EV_FALLFAR:
3736  S_StartSound (NULL, ent->number, CHAN_AUTO, S_RegisterSound ("*fall1.wav"), 1, ATTN_NORM, 0);
3737  break;
3738  }
3739 }
3740 
3741 
3742 /*
3743 ==============
3744 CL_ClearEffects
3745 
3746 ==============
3747 */
3748 void CL_ClearEffects (void)
3749 {
3750  CL_ClearParticles ();
3751  CL_ClearDlights ();
3753 }
MZ2_WIDOW_BLASTER_SWEEP3
#define MZ2_WIDOW_BLASTER_SWEEP3
Definition: q_shared.h:868
MZ2_CARRIER_MACHINEGUN_R1
#define MZ2_CARRIER_MACHINEGUN_R1
Definition: q_shared.h:849
MZ_LOGIN
#define MZ_LOGIN
Definition: q_shared.h:665
CL_TeleportParticles
void CL_TeleportParticles(vec3_t org)
Definition: cl_fxmax.c:3557
CL_SpeedTrail
void CL_SpeedTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:1106
MZ2_WIDOW_BLASTER_70L
#define MZ2_WIDOW_BLASTER_70L
Definition: q_shared.h:892
MZ2_MAKRON_BLASTER_16
#define MZ2_MAKRON_BLASTER_16
Definition: q_shared.h:825
cl_numparticles
int cl_numparticles
Definition: cl_fxmax.c:976
cplane_s::normal
vec3_t normal
Definition: q_shared.h:411
MZ2_WIDOW_PLASMABEAM
#define MZ2_WIDOW_PLASMABEAM
Definition: q_shared.h:861
MZ2_CARRIER_MACHINEGUN_L1
#define MZ2_CARRIER_MACHINEGUN_L1
Definition: q_shared.h:848
particle_s::vel
vec3_t vel
Definition: client.h:416
MZ2_WIDOW_BLASTER_SWEEP4
#define MZ2_WIDOW_BLASTER_SWEEP4
Definition: q_shared.h:869
particle_lightflare
@ particle_lightflare
Definition: particles.h:27
particle_footprint
@ particle_footprint
Definition: particles.h:29
MZ2_BOSS2_MACHINEGUN_R4
#define MZ2_BOSS2_MACHINEGUN_R4
Definition: q_shared.h:844
MZ2_WIDOW_BLASTER_SWEEP1
#define MZ2_WIDOW_BLASTER_SWEEP1
Definition: q_shared.h:866
value
GLfloat value
Definition: qgl_win.c:63
cdlight_t::decay
float decay
Definition: client.h:341
MZ2_SUPERTANK_ROCKET_2
#define MZ2_SUPERTANK_ROCKET_2
Definition: q_shared.h:774
YAW
#define YAW
Definition: q_shared.h:66
cl_mod_smoke
struct model_s * cl_mod_smoke
Definition: cl_tent.c:116
MakeNormalVectors
void MakeNormalVectors(vec3_t forward, vec3_t right, vec3_t up)
Definition: cl_fxmax.c:2803
MZ2_SOLDIER_SHOTGUN_4
#define MZ2_SOLDIER_SHOTGUN_4
Definition: q_shared.h:793
EF_GREENGIB
#define EF_GREENGIB
Definition: q_shared.h:579
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
MZ2_BOSS2_ROCKET_1
#define MZ2_BOSS2_ROCKET_1
Definition: q_shared.h:782
MZ2_TANK_MACHINEGUN_10
#define MZ2_TANK_MACHINEGUN_10
Definition: q_shared.h:706
EV_FALL
@ EV_FALL
Definition: q_shared.h:1159
MZ2_WIDOW_RAIL
#define MZ2_WIDOW_RAIL
Definition: q_shared.h:860
MAX_DLIGHTS
#define MAX_DLIGHTS
Definition: ref.h:25
MZ2_JORG_BFG_1
#define MZ2_JORG_BFG_1
Definition: q_shared.h:840
centity_t::fly_stoptime
int fly_stoptime
Definition: client.h:86
trace_t::fraction
float fraction
Definition: q_shared.h:453
MZ_SILENCED
#define MZ_SILENCED
Definition: q_shared.h:676
MZ_IONRIPPER
#define MZ_IONRIPPER
Definition: q_shared.h:673
MZ_GRENADE
#define MZ_GRENADE
Definition: q_shared.h:664
cl_dlights
cdlight_t cl_dlights[MAX_DLIGHTS]
Definition: cl_fxmax.c:230
particle_rexplosion3
@ particle_rexplosion3
Definition: particles.h:17
CL_BlasterTracer
void CL_BlasterTracer(vec3_t origin, vec3_t angle, int red, int green, int blue, float len, float size)
Definition: cl_fxmax.c:1496
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
green
GLfloat green
Definition: qgl_win.c:74
CL_MakeTeleportParticles
void CL_MakeTeleportParticles(vec3_t org, float min, float max, float size, int red, int green, int blue, particle_type particleType)
Definition: cl_fxmax.c:3512
particle_rexplosion5
@ particle_rexplosion5
Definition: particles.h:19
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
MZ2_SOLDIER_MACHINEGUN_3
#define MZ2_SOLDIER_MACHINEGUN_3
Definition: q_shared.h:791
MZ2_TANK_MACHINEGUN_17
#define MZ2_TANK_MACHINEGUN_17
Definition: q_shared.h:713
MZ2_WIDOW_BLASTER_SWEEP7
#define MZ2_WIDOW_BLASTER_SWEEP7
Definition: q_shared.h:872
MZ2_WIDOW2_BEAM_SWEEP_10
#define MZ2_WIDOW2_BEAM_SWEEP_10
Definition: q_shared.h:919
cdlight_t::radius
float radius
Definition: client.h:339
MZ2_TANK_ROCKET_3
#define MZ2_TANK_ROCKET_3
Definition: q_shared.h:718
EV_PLAYER_TELEPORT
@ EV_PLAYER_TELEPORT
Definition: q_shared.h:1161
trace_t::plane
cplane_t plane
Definition: q_shared.h:455
MZ2_TANK_BLASTER_2
#define MZ2_TANK_BLASTER_2
Definition: q_shared.h:695
MZ2_ACTOR_MACHINEGUN_1
#define MZ2_ACTOR_MACHINEGUN_1
Definition: q_shared.h:765
CL_FlameBurst
void CL_FlameBurst(vec3_t pos, float size)
Definition: cl_fxmax.c:3569
particle_rexplosion6
@ particle_rexplosion6
Definition: particles.h:20
MZ2_TURRET_ROCKET
#define MZ2_TURRET_ROCKET
Definition: q_shared.h:852
MZ2_TANK_MACHINEGUN_8
#define MZ2_TANK_MACHINEGUN_8
Definition: q_shared.h:704
MZ2_WIDOW2_BEAM_SWEEP_6
#define MZ2_WIDOW2_BEAM_SWEEP_6
Definition: q_shared.h:915
clightstyle_t::map
float map[MAX_QPATH]
Definition: cl_fx.c:56
MZ2_BOSS2_MACHINEGUN_R1
#define MZ2_BOSS2_MACHINEGUN_R1
Definition: q_shared.h:841
particle_s::time
float time
Definition: client.h:413
MZ2_INFANTRY_MACHINEGUN_4
#define MZ2_INFANTRY_MACHINEGUN_4
Definition: q_shared.h:723
MZ2_MEDIC_BLASTER_2
#define MZ2_MEDIC_BLASTER_2
Definition: q_shared.h:856
MZ2_JORG_MACHINEGUN_R1
#define MZ2_JORG_MACHINEGUN_R1
Definition: q_shared.h:834
pBloodThink
void pBloodThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1933
CL_LogoutEffect
void CL_LogoutEffect(vec3_t org, int type)
Definition: cl_fxmax.c:2323
particle_s::accel
vec3_t accel
Definition: client.h:417
avelocities
static vec3_t avelocities[NUMVERTEXNORMALS]
Definition: cl_fxmax.c:31
particle_type
particle_type
Definition: particles.h:4
MZ2_BOSS2_MACHINEGUN_L4
#define MZ2_BOSS2_MACHINEGUN_L4
Definition: q_shared.h:780
MZ2_GUNNER_MACHINEGUN_1
#define MZ2_GUNNER_MACHINEGUN_1
Definition: q_shared.h:741
MZ2_TANK_MACHINEGUN_15
#define MZ2_TANK_MACHINEGUN_15
Definition: q_shared.h:711
addParticleLight
void addParticleLight(cparticle_t *p, float light, float lightvel, float lcol0, float lcol1, float lcol2)
Definition: cl_fxmax.c:1059
particle_dexplosion1
@ particle_dexplosion1
Definition: particles.h:22
MZ2_SOLDIER_BLASTER_5
#define MZ2_SOLDIER_BLASTER_5
Definition: q_shared.h:795
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *msg_read)
Definition: common.c:735
net_message
sizebuf_t net_message
Definition: net_chan.c:82
frand
float frand(void)
Definition: common.c:1398
v
GLdouble v
Definition: qgl_win.c:143
entity_state_s
Definition: q_shared.h:1169
cdlight_t::die
float die
Definition: client.h:340
MZ2_BOSS2_ROCKET_3
#define MZ2_BOSS2_ROCKET_3
Definition: q_shared.h:784
MZ2_GUNNER_GRENADE_3
#define MZ2_GUNNER_GRENADE_3
Definition: q_shared.h:751
MZ2_TURRET_BLASTER
#define MZ2_TURRET_BLASTER
Definition: q_shared.h:853
MZ2_WIDOW_BLASTER_SWEEP2
#define MZ2_WIDOW_BLASTER_SWEEP2
Definition: q_shared.h:867
MZ2_WIDOW_BLASTER_80
#define MZ2_WIDOW_BLASTER_80
Definition: q_shared.h:877
CL_Flame
void CL_Flame(vec3_t start)
Definition: cl_fxmax.c:1422
MZ_CHAINGUN3
#define MZ_CHAINGUN3
Definition: q_shared.h:661
CL_DiminishingTrail
void CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
Definition: cl_fxmax.c:2688
MZ2_JORG_MACHINEGUN_L4
#define MZ2_JORG_MACHINEGUN_L4
Definition: q_shared.h:831
MZ_NUKE8
#define MZ_NUKE8
Definition: q_shared.h:688
CL_BloodSmack
void CL_BloodSmack(vec3_t org)
Definition: cl_fxmax.c:1974
pRainSplashThink
void pRainSplashThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1810
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
MZ2_WIDOW2_BEAMER_4
#define MZ2_WIDOW2_BEAMER_4
Definition: q_shared.h:908
model_s::flags
int flags
Definition: r_model.h:180
MZ2_WIDOW_BLASTER
#define MZ2_WIDOW_BLASTER
Definition: q_shared.h:859
MZ_MACHINEGUN
#define MZ_MACHINEGUN
Definition: q_shared.h:657
CL_ParticleEffect
void CL_ParticleEffect(vec3_t org, vec3_t dir, int color8, int count)
Definition: cl_fxmax.c:2043
cdlight_t
Definition: client.h:334
MZ2_WIDOW_BLASTER_30L
#define MZ2_WIDOW_BLASTER_30L
Definition: q_shared.h:888
MZ2_SOLDIER_MACHINEGUN_6
#define MZ2_SOLDIER_MACHINEGUN_6
Definition: q_shared.h:800
pBFGThink
void pBFGThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:3308
particle_smoke
@ particle_smoke
Definition: particles.h:7
CL_IonripperTrail
void CL_IonripperTrail(vec3_t ent, vec3_t start)
Definition: cl_fxmax.c:3110
MZ_CHAINGUN1
#define MZ_CHAINGUN1
Definition: q_shared.h:659
MZ2_SOLDIER_SHOTGUN_8
#define MZ2_SOLDIER_SHOTGUN_8
Definition: q_shared.h:805
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
qboolean
qboolean
Definition: q_shared.h:56
x
GLint GLenum GLint x
Definition: qgl_win.c:116
CL_LightningFlare
void CL_LightningFlare(vec3_t start, int srcEnt, int dstEnt)
Definition: cl_fxmax.c:1579
MZ2_SOLDIER_MACHINEGUN_1
#define MZ2_SOLDIER_MACHINEGUN_1
Definition: q_shared.h:738
EV_FOOTSTEP
@ EV_FOOTSTEP
Definition: q_shared.h:1157
MZ2_WIDOW2_BEAM_SWEEP_11
#define MZ2_WIDOW2_BEAM_SWEEP_11
Definition: q_shared.h:920
trace_t
Definition: q_shared.h:449
z
GLdouble GLdouble z
Definition: qgl_win.c:283
MZ_NUKE1
#define MZ_NUKE1
Definition: q_shared.h:685
MZ2_WIDOW2_BEAM_SWEEP_4
#define MZ2_WIDOW2_BEAM_SWEEP_4
Definition: q_shared.h:913
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
i
int i
Definition: q_shared.c:305
sfx_s
Definition: snd_loc.h:39
MZ2_TANK_MACHINEGUN_12
#define MZ2_TANK_MACHINEGUN_12
Definition: q_shared.h:708
MZ2_MAKRON_BLASTER_9
#define MZ2_MAKRON_BLASTER_9
Definition: q_shared.h:818
RAILSPACE
#define RAILSPACE
Definition: cl_fxmax.c:2890
MZ_CHAINGUN2
#define MZ_CHAINGUN2
Definition: q_shared.h:660
MZ2_GUNNER_GRENADE_4
#define MZ2_GUNNER_GRENADE_4
Definition: q_shared.h:752
MZ2_SOLDIER_SHOTGUN_6
#define MZ2_SOLDIER_SHOTGUN_6
Definition: q_shared.h:799
MZ2_INFANTRY_MACHINEGUN_3
#define MZ2_INFANTRY_MACHINEGUN_3
Definition: q_shared.h:722
MZ_HYPERBLASTER
#define MZ_HYPERBLASTER
Definition: q_shared.h:670
fv
float fv
Definition: r_edge.c:75
MZ2_INFANTRY_MACHINEGUN_7
#define MZ2_INFANTRY_MACHINEGUN_7
Definition: q_shared.h:726
MZ2_WIDOW2_BEAM_SWEEP_1
#define MZ2_WIDOW2_BEAM_SWEEP_1
Definition: q_shared.h:910
model_s
Definition: r_model.h:171
entity_state_s::event
int event
Definition: q_shared.h:1186
particle_s::org
vec3_t org
Definition: client.h:415
CL_RunDLights
void CL_RunDLights(void)
Definition: cl_fxmax.c:333
MZ2_WIDOW_RUN_2
#define MZ2_WIDOW_RUN_2
Definition: q_shared.h:894
PITCH
#define PITCH
Definition: q_shared.h:65
ATTN_IDLE
#define ATTN_IDLE
Definition: q_shared.h:1020
MZ2_JORG_MACHINEGUN_R6
#define MZ2_JORG_MACHINEGUN_R6
Definition: q_shared.h:839
cdlight_t::key
int key
Definition: client.h:336
MZ2_TANK_ROCKET_1
#define MZ2_TANK_ROCKET_1
Definition: q_shared.h:716
MZ2_WIDOW_BLASTER_SWEEP5
#define MZ2_WIDOW_BLASTER_SWEEP5
Definition: q_shared.h:870
MZ2_SOLDIER_MACHINEGUN_7
#define MZ2_SOLDIER_MACHINEGUN_7
Definition: q_shared.h:803
MZ2_SOLDIER_SHOTGUN_1
#define MZ2_SOLDIER_SHOTGUN_1
Definition: q_shared.h:736
CL_BFGExplosionParticles
void CL_BFGExplosionParticles(vec3_t org)
Definition: cl_fxmax.c:3483
client_state_t::refdef
refdef_t refdef
Definition: client.h:151
particle_blaster
@ particle_blaster
Definition: particles.h:13
M_PI
#define M_PI
Definition: q_shared.h:135
MZ2_TANK_MACHINEGUN_13
#define MZ2_TANK_MACHINEGUN_13
Definition: q_shared.h:709
MZ2_WIDOW_DISRUPTOR
#define MZ2_WIDOW_DISRUPTOR
Definition: q_shared.h:858
MZ2_INFANTRY_MACHINEGUN_8
#define MZ2_INFANTRY_MACHINEGUN_8
Definition: q_shared.h:727
MZ2_WIDOW_BLASTER_90
#define MZ2_WIDOW_BLASTER_90
Definition: q_shared.h:876
MZ2_WIDOW2_BEAMER_2
#define MZ2_WIDOW2_BEAMER_2
Definition: q_shared.h:906
type
GLenum type
Definition: qgl_win.c:72
CL_BlueFlameTrail
void CL_BlueFlameTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:1278
CL_RunLightStyles
void CL_RunLightStyles(void)
Definition: cl_fxmax.c:165
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
MZ2_HOVER_BLASTER_1
#define MZ2_HOVER_BLASTER_1
Definition: q_shared.h:763
MZ2_BOSS2_MACHINEGUN_L3
#define MZ2_BOSS2_MACHINEGUN_L3
Definition: q_shared.h:779
cl_lightstyle
clightstyle_t cl_lightstyle[MAX_LIGHTSTYLES]
Definition: cl_fxmax.c:146
MZ2_TANK_MACHINEGUN_9
#define MZ2_TANK_MACHINEGUN_9
Definition: q_shared.h:705
MZ2_TANK_MACHINEGUN_14
#define MZ2_TANK_MACHINEGUN_14
Definition: q_shared.h:710
anglemod
float anglemod(float a)
Definition: q_shared.c:293
CL_AllocDlight
cdlight_t * CL_AllocDlight(int key)
Definition: cl_fxmax.c:248
CL_BubbleTrail
void CL_BubbleTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:3173
MZ2_WIDOW_RUN_8
#define MZ2_WIDOW_RUN_8
Definition: q_shared.h:900
MZ2_MAKRON_BLASTER_2
#define MZ2_MAKRON_BLASTER_2
Definition: q_shared.h:811
CL_ClearParticles
void CL_ClearParticles(void)
Definition: cl_fxmax.c:1086
vectoangles2
void vectoangles2(vec3_t value1, vec3_t angles)
Definition: cl_newfx.c:54
j
GLint j
Definition: qgl_win.c:150
pLensFlareThink
void pLensFlareThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:3576
MZ2_INFANTRY_MACHINEGUN_6
#define MZ2_INFANTRY_MACHINEGUN_6
Definition: q_shared.h:725
particle_redblood
@ particle_redblood
Definition: particles.h:11
particle_s::next
struct particle_s * next
Definition: client.h:411
MZ2_SUPERTANK_ROCKET_1
#define MZ2_SUPERTANK_ROCKET_1
Definition: q_shared.h:773
MZ2_MEDIC_BLASTER_1
#define MZ2_MEDIC_BLASTER_1
Definition: q_shared.h:759
MZ_BLUEHYPERBLASTER
#define MZ_BLUEHYPERBLASTER
Definition: q_shared.h:674
clightstyle_t::length
int length
Definition: cl_fx.c:54
CL_ParticleEffect3
void CL_ParticleEffect3(vec3_t org, vec3_t dir, int color8, int count)
Definition: cl_fxmax.c:2164
default_pal
const byte default_pal[768]
Definition: cl_fxmax.c:37
MZ2_WIDOW_BLASTER_SWEEP6
#define MZ2_WIDOW_BLASTER_SWEEP6
Definition: q_shared.h:871
MZ2_INFANTRY_MACHINEGUN_2
#define MZ2_INFANTRY_MACHINEGUN_2
Definition: q_shared.h:721
CL_Disintegrate
void CL_Disintegrate(vec3_t pos, int ent)
Definition: cl_fxmax.c:3563
MZ2_MAKRON_BLASTER_7
#define MZ2_MAKRON_BLASTER_7
Definition: q_shared.h:816
MZ_SHOTGUN2
#define MZ_SHOTGUN2
Definition: q_shared.h:681
ATTN_NONE
#define ATTN_NONE
Definition: q_shared.h:1018
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fxmax.c:975
CL_NewDlight
void CL_NewDlight(float x, float y, float z, float radius, float time)
Definition: cl_fxmax.c:314
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:1007
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
CL_Explosion_Particle
void CL_Explosion_Particle(vec3_t org, float size, qboolean large, qboolean rocket)
Definition: cl_fxmax.c:1648
CL_RocketTrail
void CL_RocketTrail(vec3_t start, vec3_t end, centity_t *old)
Definition: cl_fxmax.c:2825
particle_s::alphavel
float alphavel
Definition: client.h:426
MZ2_WIDOW_BLASTER_20L
#define MZ2_WIDOW_BLASTER_20L
Definition: q_shared.h:887
color8green
int color8green(int color8)
Definition: cl_fxmax.c:97
MZ2_TANK_MACHINEGUN_1
#define MZ2_TANK_MACHINEGUN_1
Definition: q_shared.h:697
particle_bubble
@ particle_bubble
Definition: particles.h:12
MZ2_WIDOW_RUN_1
#define MZ2_WIDOW_RUN_1
Definition: q_shared.h:893
MZ2_INFANTRY_MACHINEGUN_11
#define MZ2_INFANTRY_MACHINEGUN_11
Definition: q_shared.h:730
bytedirs
vec3_t bytedirs[NUMVERTEXNORMALS]
Definition: common.c:300
particle_s
Definition: client.h:409
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
active_particles
cparticle_t * active_particles
Definition: cl_fxmax.c:973
CL_QuadTrail
void CL_QuadTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:2606
MZ2_JORG_MACHINEGUN_R4
#define MZ2_JORG_MACHINEGUN_R4
Definition: q_shared.h:837
MZ2_WIDOW_BLASTER_40L
#define MZ2_WIDOW_BLASTER_40L
Definition: q_shared.h:889
MZ2_GUNNER_MACHINEGUN_2
#define MZ2_GUNNER_MACHINEGUN_2
Definition: q_shared.h:742
MZ2_SOLDIER_SHOTGUN_3
#define MZ2_SOLDIER_SHOTGUN_3
Definition: q_shared.h:790
CrossProduct
void CrossProduct(vec3_t v1, vec3_t v2, vec3_t cross)
Definition: q_shared.c:753
MZ2_TANK_MACHINEGUN_16
#define MZ2_TANK_MACHINEGUN_16
Definition: q_shared.h:712
MZ2_CARRIER_ROCKET_1
#define MZ2_CARRIER_ROCKET_1
Definition: q_shared.h:901
CL_FlameTrail
void CL_FlameTrail(vec3_t start, vec3_t end, float size)
Definition: cl_fxmax.c:1370
MZ2_WIDOW_RUN_6
#define MZ2_WIDOW_RUN_6
Definition: q_shared.h:898
MZ2_WIDOW2_BEAM_SWEEP_7
#define MZ2_WIDOW2_BEAM_SWEEP_7
Definition: q_shared.h:916
EF_ROCKET
#define EF_ROCKET
Definition: q_shared.h:561
MZ2_JORG_MACHINEGUN_L2
#define MZ2_JORG_MACHINEGUN_L2
Definition: q_shared.h:829
particle_dexplosion2
@ particle_dexplosion2
Definition: particles.h:23
S_RegisterSound
sfx_t * S_RegisterSound(char *name)
Definition: snd_dma.c:305
MAXBLEEDSIZE
#define MAXBLEEDSIZE
Definition: cl_fxmax.c:1930
pSplashThink
void pSplashThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:2076
MZ2_INFANTRY_MACHINEGUN_10
#define MZ2_INFANTRY_MACHINEGUN_10
Definition: q_shared.h:729
MZ2_CHICK_ROCKET_1
#define MZ2_CHICK_ROCKET_1
Definition: q_shared.h:754
CL_ExplosionParticles
void CL_ExplosionParticles(vec3_t org)
Definition: cl_fxmax.c:2448
MZ2_GUNNER_MACHINEGUN_6
#define MZ2_GUNNER_MACHINEGUN_6
Definition: q_shared.h:746
MZ2_WIDOW_BLASTER_30
#define MZ2_WIDOW_BLASTER_30
Definition: q_shared.h:882
centity_t
Definition: client.h:75
CL_BloodBleed
void CL_BloodBleed(vec3_t org, vec3_t pos, vec3_t dir)
Definition: cl_fxmax.c:1990
CL_BfgParticles
void CL_BfgParticles(entity_t *ent)
Definition: cl_fxmax.c:3317
MZ2_WIDOW2_BEAM_SWEEP_2
#define MZ2_WIDOW2_BEAM_SWEEP_2
Definition: q_shared.h:911
MZ2_TANK_MACHINEGUN_4
#define MZ2_TANK_MACHINEGUN_4
Definition: q_shared.h:700
cl_sfx_footsteps
struct sfx_s * cl_sfx_footsteps[4]
Definition: cl_tent.c:113
MZ2_SUPERTANK_ROCKET_3
#define MZ2_SUPERTANK_ROCKET_3
Definition: q_shared.h:775
CL_Disruptor_Explosion_Particle
void CL_Disruptor_Explosion_Particle(vec3_t org, float size)
Definition: cl_fxmax.c:1734
MZ2_WIDOW_BLASTER_60
#define MZ2_WIDOW_BLASTER_60
Definition: q_shared.h:879
ROLL
#define ROLL
Definition: q_shared.h:67
CL_RailTrail
void CL_RailTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:3032
starttime
int starttime
Definition: sys_win.c:41
MZ2_INFANTRY_MACHINEGUN_5
#define MZ2_INFANTRY_MACHINEGUN_5
Definition: q_shared.h:724
MZ_SHOTGUN
#define MZ_SHOTGUN
Definition: q_shared.h:658
forward
static vec3_t forward
Definition: p_view.c:29
MZ2_WIDOW_BLASTER_50L
#define MZ2_WIDOW_BLASTER_50L
Definition: q_shared.h:890
CL_ParticleEffect2
void CL_ParticleEffect2(vec3_t org, vec3_t dir, int color8, int count)
Definition: cl_fxmax.c:2131
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
crandom
#define crandom()
Definition: g_local.h:510
CL_FlagTrail
void CL_FlagTrail(vec3_t start, vec3_t end, qboolean isred)
Definition: cl_fxmax.c:2647
MZ2_WIDOW2_BEAMER_1
#define MZ2_WIDOW2_BEAMER_1
Definition: q_shared.h:905
cl_footsteps
cvar_t * cl_footsteps
Definition: cl_main.c:44
MZ2_SUPERTANK_MACHINEGUN_2
#define MZ2_SUPERTANK_MACHINEGUN_2
Definition: q_shared.h:768
MZ_LOGOUT
#define MZ_LOGOUT
Definition: q_shared.h:666
MZ2_STALKER_BLASTER
#define MZ2_STALKER_BLASTER
Definition: q_shared.h:854
V_AddParticle
void V_AddParticle(vec3_t org, int color, float alpha)
Definition: cl_view.c:139
MZ2_WIDOW2_BEAMER_3
#define MZ2_WIDOW2_BEAMER_3
Definition: q_shared.h:907
EF_GIB
#define EF_GIB
Definition: q_shared.h:559
MZ2_BOSS2_MACHINEGUN_L1
#define MZ2_BOSS2_MACHINEGUN_L1
Definition: q_shared.h:777
centity_t::trailcount
int trailcount
Definition: client.h:83
CL_FlyParticles
void CL_FlyParticles(vec3_t origin, int count)
Definition: cl_fxmax.c:3216
pExplosionThink
void pExplosionThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1621
MZ_NUKE4
#define MZ_NUKE4
Definition: q_shared.h:687
MZ_RAILGUN
#define MZ_RAILGUN
Definition: q_shared.h:662
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:155
MZ2_MAKRON_BLASTER_17
#define MZ2_MAKRON_BLASTER_17
Definition: q_shared.h:826
particle_s::alpha
float alpha
Definition: client.h:425
CL_AllocFreeDlight
cdlight_t * CL_AllocFreeDlight()
Definition: cl_fxmax.c:286
particle_rexplosion4
@ particle_rexplosion4
Definition: particles.h:18
MZ_NUKE2
#define MZ_NUKE2
Definition: q_shared.h:686
MZ2_MAKRON_BLASTER_15
#define MZ2_MAKRON_BLASTER_15
Definition: q_shared.h:824
MZ2_TANK_MACHINEGUN_6
#define MZ2_TANK_MACHINEGUN_6
Definition: q_shared.h:702
MZ2_MAKRON_BLASTER_13
#define MZ2_MAKRON_BLASTER_13
Definition: q_shared.h:822
cvar_s::value
float value
Definition: q_shared.h:324
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *msg_read)
Definition: common.c:722
cdlight_t::color
vec3_t color
Definition: client.h:337
MZ2_SOLDIER_BLASTER_8
#define MZ2_SOLDIER_BLASTER_8
Definition: q_shared.h:804
CL_GunSmokeEffect
void CL_GunSmokeEffect(vec3_t org, vec3_t dir)
MZ2_BOSS2_MACHINEGUN_R2
#define MZ2_BOSS2_MACHINEGUN_R2
Definition: q_shared.h:842
random
#define random()
Definition: g_local.h:509
BEAMLENGTH
#define BEAMLENGTH
Definition: cl_fxmax.c:3316
EXPLODESTAININTESITY
#define EXPLODESTAININTESITY
Definition: cl_fxmax.c:1647
MZ2_WIDOW_BLASTER_SWEEP9
#define MZ2_WIDOW_BLASTER_SWEEP9
Definition: q_shared.h:874
particle_rexplosion2
@ particle_rexplosion2
Definition: particles.h:16
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
entity_state_s::number
int number
Definition: q_shared.h:1171
NULL
#define NULL
Definition: q_shared.h:60
MZ2_GUNNER_MACHINEGUN_3
#define MZ2_GUNNER_MACHINEGUN_3
Definition: q_shared.h:743
free_particles
cparticle_t * free_particles
Definition: cl_fxmax.c:973
MZ2_SOLDIER_SHOTGUN_7
#define MZ2_SOLDIER_SHOTGUN_7
Definition: q_shared.h:802
MZ2_CARRIER_MACHINEGUN_R2
#define MZ2_CARRIER_MACHINEGUN_R2
Definition: q_shared.h:863
particle_lensflare
@ particle_lensflare
Definition: particles.h:26
MZ2_MAKRON_BLASTER_10
#define MZ2_MAKRON_BLASTER_10
Definition: q_shared.h:819
setupParticle
cparticle_t * setupParticle(float angle0, float angle1, float angle2, float org0, float org1, float org2, float vel0, float vel1, float vel2, float accel0, float accel1, float accel2, float color0, float color1, float color2, float colorvel0, float colorvel1, float colorvel2, float alpha, float alphavel, float size, float sizevel, int image, int flags, void(*think)(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time), qboolean thinknext)
Definition: cl_fxmax.c:978
CL_ClearLightStyles
void CL_ClearLightStyles(void)
Definition: cl_fxmax.c:154
MZ2_WIDOW_BLASTER_100
#define MZ2_WIDOW_BLASTER_100
Definition: q_shared.h:875
V_AddLightStyle
void V_AddLightStyle(int style, float r, float g, float b)
Definition: cl_view.c:178
MZ2_GUNNER_MACHINEGUN_4
#define MZ2_GUNNER_MACHINEGUN_4
Definition: q_shared.h:744
CL_ClearDlights
void CL_ClearDlights(void)
Definition: cl_fxmax.c:237
clightstyle_t
Definition: cl_fx.c:52
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
MZ2_TANK_MACHINEGUN_3
#define MZ2_TANK_MACHINEGUN_3
Definition: q_shared.h:699
MZ2_BOSS2_ROCKET_2
#define MZ2_BOSS2_ROCKET_2
Definition: q_shared.h:783
CL_ParticleBulletDecal
void CL_ParticleBulletDecal(vec3_t org, vec3_t dir, float size)
Definition: cl_fxmax.c:2267
lastofs
int lastofs
Definition: cl_fxmax.c:147
MZ2_JORG_MACHINEGUN_L6
#define MZ2_JORG_MACHINEGUN_L6
Definition: q_shared.h:833
particle_rexplosion7
@ particle_rexplosion7
Definition: particles.h:21
CL_ParseMuzzleFlash
void CL_ParseMuzzleFlash(void)
Definition: cl_fxmax.c:360
current
static int current
Definition: cl_scrn.c:131
particle_inferno
@ particle_inferno
Definition: particles.h:28
color8red
int color8red(int color8)
Definition: cl_fxmax.c:93
CL_SetLightstyle
void CL_SetLightstyle(int i)
Definition: cl_fxmax.c:191
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
clightstyle_t::value
float value[3]
Definition: cl_fx.c:55
client_state_t::time
int time
Definition: client.h:147
MZ2_MAKRON_BLASTER_8
#define MZ2_MAKRON_BLASTER_8
Definition: q_shared.h:817
MZ2_SOLDIER_BLASTER_6
#define MZ2_SOLDIER_BLASTER_6
Definition: q_shared.h:798
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
MZ2_SOLDIER_BLASTER_4
#define MZ2_SOLDIER_BLASTER_4
Definition: q_shared.h:792
CL_ForceTrail
void CL_ForceTrail(vec3_t start, vec3_t end, qboolean light, float size)
Definition: cl_fxmax.c:1221
MZ2_GUNNER_MACHINEGUN_5
#define MZ2_GUNNER_MACHINEGUN_5
Definition: q_shared.h:745
EV_ITEM_RESPAWN
@ EV_ITEM_RESPAWN
Definition: q_shared.h:1156
MZ_BLASTER2
#define MZ_BLASTER2
Definition: q_shared.h:683
MZ2_CARRIER_RAILGUN
#define MZ2_CARRIER_RAILGUN
Definition: q_shared.h:857
MZ_BFG
#define MZ_BFG
Definition: q_shared.h:668
pStunRotateThink
void pStunRotateThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1145
MZ2_WIDOW_BLASTER_20
#define MZ2_WIDOW_BLASTER_20
Definition: q_shared.h:883
MZ2_WIDOW_BLASTER_40
#define MZ2_WIDOW_BLASTER_40
Definition: q_shared.h:881
MZ2_FLOAT_BLASTER_1
#define MZ2_FLOAT_BLASTER_1
Definition: q_shared.h:787
MZ2_TANK_ROCKET_2
#define MZ2_TANK_ROCKET_2
Definition: q_shared.h:717
CL_RailSprial
void CL_RailSprial(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:2892
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
CL_ParticleEffectSplash
void CL_ParticleEffectSplash(vec3_t org, vec3_t dir, int color8, int count)
Definition: cl_fxmax.c:2101
MZ2_SOLDIER_BLASTER_7
#define MZ2_SOLDIER_BLASTER_7
Definition: q_shared.h:801
DEVRAILSTEPS
#define DEVRAILSTEPS
Definition: cl_fxmax.c:2961
MZ2_SOLDIER_BLASTER_3
#define MZ2_SOLDIER_BLASTER_3
Definition: q_shared.h:789
CL_BlasterTrail
void CL_BlasterTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:2564
MZ2_SOLDIER_BLASTER_1
#define MZ2_SOLDIER_BLASTER_1
Definition: q_shared.h:734
MZ2_MAKRON_BLASTER_14
#define MZ2_MAKRON_BLASTER_14
Definition: q_shared.h:823
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:157
MZ2_GUNNER_MACHINEGUN_7
#define MZ2_GUNNER_MACHINEGUN_7
Definition: q_shared.h:747
model_s::radius
float radius
Definition: gl_model.h:189
CL_Trace
trace_t CL_Trace(vec3_t start, vec3_t end, float size, int contentmask)
MZ_TRACKER
#define MZ_TRACKER
Definition: q_shared.h:684
vectoanglerolled
void vectoanglerolled(vec3_t value1, float angleyaw, vec3_t angles)
Definition: cl_fxmax.c:106
y
GLint y
Definition: qgl_win.c:115
MZ2_BOSS2_MACHINEGUN_L5
#define MZ2_BOSS2_MACHINEGUN_L5
Definition: q_shared.h:781
MZ2_TANK_BLASTER_3
#define MZ2_TANK_BLASTER_3
Definition: q_shared.h:696
CL_BlasterParticles
void CL_BlasterParticles(vec3_t org, vec3_t dir, int count)
Definition: cl_fxmax.c:2534
re
refexport_t re
Definition: vid_dll.c:31
particle_lightning
@ particle_lightning
Definition: particles.h:25
particle_generic
@ particle_generic
Definition: particles.h:6
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
CL_TeleporterParticles
void CL_TeleporterParticles(entity_state_t *ent)
Definition: cl_fxmax.c:2295
INSTANT_PARTICLE
#define INSTANT_PARTICLE
Definition: client.h:456
particle_dexplosion3
@ particle_dexplosion3
Definition: particles.h:24
MZ2_MAKRON_BLASTER_1
#define MZ2_MAKRON_BLASTER_1
Definition: q_shared.h:810
pBlasterMaxSize
#define pBlasterMaxSize
Definition: cl_fxmax.c:2521
MZ2_WIDOW2_BEAM_SWEEP_8
#define MZ2_WIDOW2_BEAM_SWEEP_8
Definition: q_shared.h:917
MZ2_JORG_MACHINEGUN_R2
#define MZ2_JORG_MACHINEGUN_R2
Definition: q_shared.h:835
cl_mod_flash
struct model_s * cl_mod_flash
Definition: cl_tent.c:117
CL_DevRailTrail
void CL_DevRailTrail(vec3_t start, vec3_t end)
Definition: cl_fxmax.c:2962
MZ2_SOLDIER_MACHINEGUN_8
#define MZ2_SOLDIER_MACHINEGUN_8
Definition: q_shared.h:806
CL_Shield
void CL_Shield(vec3_t origin, float angle, int red, int green, int blue, float size, int times)
Definition: cl_fxmax.c:1477
MZ2_WIDOW_BLASTER_SWEEP8
#define MZ2_WIDOW_BLASTER_SWEEP8
Definition: q_shared.h:873
particle_blooddrip
@ particle_blooddrip
Definition: particles.h:10
MZ2_WIDOW_RUN_3
#define MZ2_WIDOW_RUN_3
Definition: q_shared.h:895
trace_t::endpos
vec3_t endpos
Definition: q_shared.h:454
particle_shield
@ particle_shield
Definition: particles.h:30
MZ2_WIDOW_BLASTER_0
#define MZ2_WIDOW_BLASTER_0
Definition: q_shared.h:885
CL_TrapParticles
void CL_TrapParticles(entity_t *ent)
Definition: cl_fxmax.c:3384
MZ2_WIDOW_BLASTER_10L
#define MZ2_WIDOW_BLASTER_10L
Definition: q_shared.h:886
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
MZ2_MAKRON_BLASTER_5
#define MZ2_MAKRON_BLASTER_5
Definition: q_shared.h:814
particle_s::colorvel
float colorvel
Definition: client.h:423
MZ2_INFANTRY_MACHINEGUN_13
#define MZ2_INFANTRY_MACHINEGUN_13
Definition: q_shared.h:732
MZ2_MAKRON_BLASTER_6
#define MZ2_MAKRON_BLASTER_6
Definition: q_shared.h:815
up
static vec3_t up
Definition: p_view.c:29
MZ2_JORG_MACHINEGUN_L3
#define MZ2_JORG_MACHINEGUN_L3
Definition: q_shared.h:830
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:1008
CL_EntityEvent
void CL_EntityEvent(entity_state_t *ent)
Definition: cl_fxmax.c:3713
CL_LightningBeam
void CL_LightningBeam(vec3_t start, vec3_t end, int srcEnt, int dstEnt, float size)
Definition: cl_fxmax.c:1543
MZ2_BOSS2_MACHINEGUN_R5
#define MZ2_BOSS2_MACHINEGUN_R5
Definition: q_shared.h:845
SetParticleImages
void SetParticleImages(void)
Definition: cl_fxmax.c:54
CL_ClearEffects
void CL_ClearEffects(void)
Definition: cl_fxmax.c:3748
MZ_PHALANX
#define MZ_PHALANX
Definition: q_shared.h:675
MZ2_BOSS2_MACHINEGUN_R3
#define MZ2_BOSS2_MACHINEGUN_R3
Definition: q_shared.h:843
MZ2_INFANTRY_MACHINEGUN_1
#define MZ2_INFANTRY_MACHINEGUN_1
Definition: q_shared.h:720
entity_s
Definition: ref.h:49
color8blue
int color8blue(int color8)
Definition: cl_fxmax.c:101
MZ_ROCKET
#define MZ_ROCKET
Definition: q_shared.h:663
MZ2_TANK_MACHINEGUN_2
#define MZ2_TANK_MACHINEGUN_2
Definition: q_shared.h:698
client_static_t::frametime
float frametime
Definition: client.h:229
MZ2_DAEDALUS_BLASTER
#define MZ2_DAEDALUS_BLASTER
Definition: q_shared.h:855
sqrt
double sqrt(double x)
blue
GLfloat GLfloat blue
Definition: qgl_win.c:74
particle_blooddrop
@ particle_blooddrop
Definition: particles.h:9
MZ2_TANK_MACHINEGUN_19
#define MZ2_TANK_MACHINEGUN_19
Definition: q_shared.h:715
pSparksThink
void pSparksThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:2194
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
RAILTRAILSPACE
#define RAILTRAILSPACE
Definition: cl_fxmax.c:3031
MZ2_WIDOW2_BEAMER_5
#define MZ2_WIDOW2_BEAMER_5
Definition: q_shared.h:909
MZ2_SUPERTANK_MACHINEGUN_6
#define MZ2_SUPERTANK_MACHINEGUN_6
Definition: q_shared.h:772
MZ2_BOSS2_MACHINEGUN_L2
#define MZ2_BOSS2_MACHINEGUN_L2
Definition: q_shared.h:778
MZ2_INFANTRY_MACHINEGUN_12
#define MZ2_INFANTRY_MACHINEGUN_12
Definition: q_shared.h:731
EV_FALLSHORT
@ EV_FALLSHORT
Definition: q_shared.h:1158
MZ2_TANK_MACHINEGUN_7
#define MZ2_TANK_MACHINEGUN_7
Definition: q_shared.h:703
CL_AddDLights
void CL_AddDLights(void)
Definition: cl_fxmax.c:947
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:178
pBlasterThink
void pBlasterThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:2522
MZ2_GUNNER_GRENADE_2
#define MZ2_GUNNER_GRENADE_2
Definition: q_shared.h:750
cdlight_t::minlight
float minlight
Definition: client.h:342
MZ2_WIDOW_BLASTER_70
#define MZ2_WIDOW_BLASTER_70
Definition: q_shared.h:878
CL_BloodHit
void CL_BloodHit(vec3_t org, vec3_t dir)
Definition: cl_fxmax.c:2006
MZ2_INFANTRY_MACHINEGUN_9
#define MZ2_INFANTRY_MACHINEGUN_9
Definition: q_shared.h:728
CL_AddParticles
void CL_AddParticles(void)
Definition: cl_fxmax.c:3605
MZ2_SOLDIER_BLASTER_2
#define MZ2_SOLDIER_BLASTER_2
Definition: q_shared.h:735
pExplosionSparksThink
void pExplosionSparksThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:2399
MZ2_WIDOW_RUN_7
#define MZ2_WIDOW_RUN_7
Definition: q_shared.h:899
EV_FALLFAR
@ EV_FALLFAR
Definition: q_shared.h:1160
MZ2_TANK_MACHINEGUN_5
#define MZ2_TANK_MACHINEGUN_5
Definition: q_shared.h:701
CL_InfernoTrail
void CL_InfernoTrail(vec3_t start, vec3_t end, float size)
Definition: cl_fxmax.c:1315
MZ2_TANK_MACHINEGUN_11
#define MZ2_TANK_MACHINEGUN_11
Definition: q_shared.h:707
MZ2_WIDOW2_BEAM_SWEEP_3
#define MZ2_WIDOW2_BEAM_SWEEP_3
Definition: q_shared.h:912
particle_blood
@ particle_blood
Definition: particles.h:8
MZ2_WIDOW_BLASTER_10
#define MZ2_WIDOW_BLASTER_10
Definition: q_shared.h:884
MZ2_WIDOW_RUN_4
#define MZ2_WIDOW_RUN_4
Definition: q_shared.h:896
CL_LensFlare
void CL_LensFlare(vec3_t pos, vec3_t color, float size, float time)
Definition: cl_fxmax.c:3583
MZ2_WIDOW2_BEAM_SWEEP_9
#define MZ2_WIDOW2_BEAM_SWEEP_9
Definition: q_shared.h:918
cdlight_t::origin
vec3_t origin
Definition: client.h:338
MZ2_TURRET_MACHINEGUN
#define MZ2_TURRET_MACHINEGUN
Definition: q_shared.h:851
CL_ParseMuzzleFlash2
void CL_ParseMuzzleFlash2(void)
Definition: cl_fxmax.c:554
MZ2_SUPERTANK_MACHINEGUN_3
#define MZ2_SUPERTANK_MACHINEGUN_3
Definition: q_shared.h:769
CL_ParticleEffectSparks
void CL_ParticleEffectSparks(vec3_t org, vec3_t dir, vec3_t color, int count)
Definition: cl_fxmax.c:2213
colorAdd
#define colorAdd
Definition: cl_fxmax.c:2074
right
GLdouble right
Definition: qgl_win.c:159
MZ2_GUNNER_GRENADE_1
#define MZ2_GUNNER_GRENADE_1
Definition: q_shared.h:749
centity_t::current
entity_state_t current
Definition: client.h:78
CL_BlasterSplash
void CL_BlasterSplash(vec3_t origin, int red, int green, int blue, float size)
Definition: cl_fxmax.c:1519
MZ2_JORG_MACHINEGUN_L1
#define MZ2_JORG_MACHINEGUN_L1
Definition: q_shared.h:828
CS_LIGHTS
#define CS_LIGHTS
Definition: q_shared.h:1139
pDisruptExplosionThink
void pDisruptExplosionThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1716
MZ2_WIDOW_BLASTER_60L
#define MZ2_WIDOW_BLASTER_60L
Definition: q_shared.h:891
refdef_t::viewangles
float viewangles[3]
Definition: ref.h:125
CL_AddLightStyles
void CL_AddLightStyles(void)
Definition: cl_fxmax.c:213
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:1011
MZ2_WIDOW2_BEAM_SWEEP_5
#define MZ2_WIDOW2_BEAM_SWEEP_5
Definition: q_shared.h:914
cls
client_static_t cls
Definition: cl_main.c:105
NUMVERTEXNORMALS
#define NUMVERTEXNORMALS
Definition: qcommon.h:786
MZ2_CARRIER_MACHINEGUN_L2
#define MZ2_CARRIER_MACHINEGUN_L2
Definition: q_shared.h:862
SplashSize
#define SplashSize
Definition: cl_fxmax.c:2075
MZ2_SUPERTANK_MACHINEGUN_5
#define MZ2_SUPERTANK_MACHINEGUN_5
Definition: q_shared.h:771
crand
float crand(void)
Definition: common.c:1403
MZ2_SUPERTANK_MACHINEGUN_1
#define MZ2_SUPERTANK_MACHINEGUN_1
Definition: q_shared.h:767
MZ2_FLYER_BLASTER_1
#define MZ2_FLYER_BLASTER_1
Definition: q_shared.h:756
ClipCam
void ClipCam(vec3_t start, vec3_t end, vec3_t newpos)
Definition: cl_fxmax.c:122
MZ_RESPAWN
#define MZ_RESPAWN
Definition: q_shared.h:667
CL_StunBlast
void CL_StunBlast(vec3_t pos, vec3_t color, float size)
Definition: cl_fxmax.c:1161
CL_WeatherFx
void CL_WeatherFx(vec3_t org, vec3_t vec, vec3_t color, int type, float size, float time)
Definition: cl_fxmax.c:1884
CL_ItemRespawnParticles
void CL_ItemRespawnParticles(vec3_t org)
Definition: cl_fxmax.c:2371
MZ2_WIDOW_BLASTER_50
#define MZ2_WIDOW_BLASTER_50
Definition: q_shared.h:880
MZ2_MAKRON_BFG
#define MZ2_MAKRON_BFG
Definition: q_shared.h:809
MZ2_WIDOW_RUN_5
#define MZ2_WIDOW_RUN_5
Definition: q_shared.h:897
MAX_LIGHTSTYLES
#define MAX_LIGHTSTYLES
Definition: q_shared.h:81
particle_beam
@ particle_beam
Definition: particles.h:14
MZ_HEATBEAM
#define MZ_HEATBEAM
Definition: q_shared.h:682
CL_LaserStun
void CL_LaserStun(vec3_t pos, vec3_t direction, vec3_t color, float size)
Definition: cl_fxmax.c:1195
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:108
MZ2_SUPERTANK_MACHINEGUN_4
#define MZ2_SUPERTANK_MACHINEGUN_4
Definition: q_shared.h:770
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
MZ2_SOLDIER_MACHINEGUN_4
#define MZ2_SOLDIER_MACHINEGUN_4
Definition: q_shared.h:794
cl
client_state_t cl
Definition: cl_main.c:106
MZ2_SOLDIER_SHOTGUN_2
#define MZ2_SOLDIER_SHOTGUN_2
Definition: q_shared.h:737
MZ2_TANK_MACHINEGUN_18
#define MZ2_TANK_MACHINEGUN_18
Definition: q_shared.h:714
particle_rexplosion1
@ particle_rexplosion1
Definition: particles.h:15
PARTICLE_GRAVITY
#define PARTICLE_GRAVITY
Definition: client.h:453
MZ2_MAKRON_BLASTER_4
#define MZ2_MAKRON_BLASTER_4
Definition: q_shared.h:813
MZ2_GLADIATOR_RAILGUN_1
#define MZ2_GLADIATOR_RAILGUN_1
Definition: q_shared.h:761
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
MZ2_JORG_MACHINEGUN_R5
#define MZ2_JORG_MACHINEGUN_R5
Definition: q_shared.h:838
MZ2_JORG_MACHINEGUN_L5
#define MZ2_JORG_MACHINEGUN_L5
Definition: q_shared.h:832
MZ2_TANK_BLASTER_1
#define MZ2_TANK_BLASTER_1
Definition: q_shared.h:694
client.h
MZ2_SOLDIER_SHOTGUN_5
#define MZ2_SOLDIER_SHOTGUN_5
Definition: q_shared.h:796
MZ_ETF_RIFLE
#define MZ_ETF_RIFLE
Definition: q_shared.h:679
pWeatherFXThink
void pWeatherFXThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:1815
CL_ParticleFootPrint
void CL_ParticleFootPrint(vec3_t org, vec3_t angle, float size, vec3_t color)
Definition: cl_fxmax.c:2243
MZ2_JORG_MACHINEGUN_R3
#define MZ2_JORG_MACHINEGUN_R3
Definition: q_shared.h:836
particle_s::color
float color
Definition: client.h:422
MZ2_MAKRON_BLASTER_3
#define MZ2_MAKRON_BLASTER_3
Definition: q_shared.h:812
MZ2_SOLDIER_MACHINEGUN_2
#define MZ2_SOLDIER_MACHINEGUN_2
Definition: q_shared.h:739
MZ2_BOSS2_ROCKET_4
#define MZ2_BOSS2_ROCKET_4
Definition: q_shared.h:785
MZ2_GUNNER_MACHINEGUN_8
#define MZ2_GUNNER_MACHINEGUN_8
Definition: q_shared.h:748
CL_BigTeleportParticles
void CL_BigTeleportParticles(vec3_t org)
Definition: cl_fxmax.c:2484
pRotateThink
void pRotateThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
MZ_SSHOTGUN
#define MZ_SSHOTGUN
Definition: q_shared.h:669
count
GLint GLsizei count
Definition: qgl_win.c:128
CL_Tracer
void CL_Tracer(vec3_t origin, vec3_t angle, int red, int green, int blue, float len, float size)
Definition: cl_fxmax.c:1456
CL_FlyEffect
void CL_FlyEffect(centity_t *ent, vec3_t origin)
Definition: cl_fxmax.c:3271
MZ2_MAKRON_BLASTER_11
#define MZ2_MAKRON_BLASTER_11
Definition: q_shared.h:820
S_StartSound
void S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float fvol, float attenuation, float timeofs)
Definition: snd_dma.c:655
pDevRailThink
void pDevRailThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
Definition: cl_fxmax.c:2937
MZ2_FLYER_BLASTER_2
#define MZ2_FLYER_BLASTER_2
Definition: q_shared.h:757
V_AddLight
void V_AddLight(vec3_t org, float intensity, float r, float g, float b)
Definition: cl_view.c:157
MZ2_MAKRON_BLASTER_12
#define MZ2_MAKRON_BLASTER_12
Definition: q_shared.h:821
MZ2_SOLDIER_MACHINEGUN_5
#define MZ2_SOLDIER_MACHINEGUN_5
Definition: q_shared.h:797
MZ_BLASTER
#define MZ_BLASTER
Definition: q_shared.h:656
MAX_PARTICLES
#define MAX_PARTICLES
Definition: ref.h:27