icculus quake2 doxygen  1.0 dev
cl_newfx.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_newfx.c -- MORE entity effects parsing and management
21 
22 #include "client.h"
23 
26 extern int cl_numparticles;
27 extern cvar_t *vid_ref;
28 
30 
31 #ifdef QMAX
33  float angle0, float angle1, float angle2,
34  float org0, float org1, float org2,
35  float vel0, float vel1, float vel2,
36  float accel0, float accel1, float accel2,
37  float color0, float color1, float color2,
38  float colorvel0, float colorvel1, float colorvel2,
39  float alpha, float alphavel,
40  float size, float sizevel,
41  int image,
42  int flags,
43  void (*think)(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time),
44  qboolean thinknext);
45 
46 #endif
47 
48 
49 /*
50 ======
51 vectoangles2 - this is duplicated in the game DLL, but I need it here.
52 ======
53 */
54 void vectoangles2 (vec3_t value1, vec3_t angles)
55 {
56  float forward;
57  float yaw, pitch;
58 
59  if (value1[1] == 0 && value1[0] == 0)
60  {
61  yaw = 0;
62  if (value1[2] > 0)
63  pitch = 90;
64  else
65  pitch = 270;
66  }
67  else
68  {
69  // PMM - fixed to correct for pitch of 0
70  if (value1[0])
71  yaw = (atan2(value1[1], value1[0]) * 180 / M_PI);
72  else if (value1[1] > 0)
73  yaw = 90;
74  else
75  yaw = 270;
76 
77  if (yaw < 0)
78  yaw += 360;
79 
80  forward = sqrt (value1[0]*value1[0] + value1[1]*value1[1]);
81  pitch = (atan2(value1[2], forward) * 180 / M_PI);
82  if (pitch < 0)
83  pitch += 360;
84  }
85 
86  angles[PITCH] = -pitch;
87  angles[YAW] = yaw;
88  angles[ROLL] = 0;
89 }
90 
91 //=============
92 //=============
93 void CL_Flashlight (int ent, vec3_t pos)
94 {
95  cdlight_t *dl;
96 
97  dl = CL_AllocDlight (ent);
98  VectorCopy (pos, dl->origin);
99  dl->radius = 400;
100  dl->minlight = 250;
101  dl->die = cl.time + 100;
102  dl->color[0] = 1;
103  dl->color[1] = 1;
104  dl->color[2] = 1;
105 }
106 
107 /*
108 ======
109 CL_ColorFlash - flash of light
110 ======
111 */
112 void CL_ColorFlash (vec3_t pos, int ent, int intensity, float r, float g, float b)
113 {
114  cdlight_t *dl;
115 
116  if((vidref_val == VIDREF_SOFT) && ((r < 0) || (g<0) || (b<0)))
117  {
118  intensity = -intensity;
119  r = -r;
120  g = -g;
121  b = -b;
122  }
123 
124  dl = CL_AllocDlight (ent);
125  VectorCopy (pos, dl->origin);
126  dl->radius = intensity;
127  dl->minlight = 250;
128  dl->die = cl.time + 100;
129  dl->color[0] = r;
130  dl->color[1] = g;
131  dl->color[2] = b;
132 }
133 
134 
135 /*
136 ======
137 CL_DebugTrail
138 ======
139 */
140 void CL_DebugTrail (vec3_t start, vec3_t end)
141 {
142  vec3_t move;
143  vec3_t vec;
144  float len;
145 #ifndef QMAX
146  cparticle_t *p;
147 #endif
148  float dec;
149  vec3_t right, up;
150 
151  VectorCopy (start, move);
152  VectorSubtract (end, start, vec);
153  len = VectorNormalize (vec);
154 
155  MakeNormalVectors (vec, right, up);
156 
157 // VectorScale(vec, RT2_SKIP, vec);
158 
159 // dec = 1.0;
160 // dec = 0.75;
161  dec = 3;
162  VectorScale (vec, dec, vec);
163  VectorCopy (start, move);
164 
165  while (len > 0)
166  {
167  len -= dec;
168 #ifdef QMAX
169  setupParticle (
170  0, 0, 0,
171  move[0], move[1], move[2],
172  0, 0, 0,
173  0, 0, 0,
174  50, 50, 255,
175  0, 0, 0,
176  1, -0.75,
177  7.5, 0,
179  0,
180  NULL,0);
181 #else
182  if (!free_particles)
183  return;
184  p = free_particles;
185  free_particles = p->next;
186  p->next = active_particles;
187  active_particles = p;
188 
189  p->time = cl.time;
190  VectorClear (p->accel);
191  VectorClear (p->vel);
192  p->alpha = 1.0;
193  p->alphavel = -0.1;
194 // p->alphavel = 0;
195  p->color = 0x74 + (rand()&7);
196  VectorCopy (move, p->org);
197  /*
198  for (j=0 ; j<3 ; j++)
199  {
200  p->org[j] = move[j] + crand()*2;
201  p->vel[j] = crand()*3;
202  p->accel[j] = 0;
203  }
204  */
205 #endif
206  VectorAdd (move, vec, move);
207  }
208 
209 }
210 
211 /*
212 ===============
213 CL_SmokeTrail
214 ===============
215 */
216 void CL_SmokeTrail (vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
217 {
218  vec3_t move;
219  vec3_t vec;
220  float len;
221  int j;
222  cparticle_t *p;
223 
224  VectorCopy (start, move);
225  VectorSubtract (end, start, vec);
226  len = VectorNormalize (vec);
227 
228  VectorScale (vec, spacing, vec);
229 
230  // FIXME: this is a really silly way to have a loop
231  while (len > 0)
232  {
233  len -= spacing;
234 
235  if (!free_particles)
236  return;
237  p = free_particles;
238  free_particles = p->next;
239  p->next = active_particles;
240  active_particles = p;
241  VectorClear (p->accel);
242 
243  p->time = cl.time;
244 
245  p->alpha = 1.0;
246  p->alphavel = -1.0 / (1+frand()*0.5);
247 #ifndef QMAX
248  p->color = colorStart + (rand() % colorRun);
249 #endif
250  for (j=0 ; j<3 ; j++)
251  {
252  p->org[j] = move[j] + crand()*3;
253  p->accel[j] = 0;
254  }
255  p->vel[2] = 20 + crand()*5;
256 
257  VectorAdd (move, vec, move);
258  }
259 }
260 
261 void CL_ForceWall (vec3_t start, vec3_t end, int color8)
262 {
263  vec3_t move;
264  vec3_t vec;
265 #ifdef QMAX
266  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
267 #else
268  int j;
269  cparticle_t *p;
270 #endif
271 
272  float len;
273 
274  VectorCopy (start, move);
275  VectorSubtract (end, start, vec);
276  len = VectorNormalize (vec);
277 
278  VectorScale (vec, 4, vec);
279 
280  // FIXME: this is a really silly way to have a loop
281  while (len > 0)
282  {
283  len -= 4;
284 
285  if (!free_particles)
286  return;
287 
288  if (frand() > 0.3)
289  {
290 #ifdef QMAX
291  setupParticle (
292  0, 0, 0,
293  move[0] + crand()*3, move[1] + crand()*3, move[2] + crand()*3,
294  0, 0, -40 - (crand()*10),
295  0, 0, 0,
296  color[0]+5, color[1]+5, color[2]+5,
297  0, 0, 0,
298  1, -1.0 / (3.0+frand()*0.5),
299  5, 0,
301  0,
302  NULL,0);
303 #else
304  p = free_particles;
305  free_particles = p->next;
306  p->next = active_particles;
307  active_particles = p;
308  VectorClear (p->accel);
309 
310  p->time = cl.time;
311 
312  p->alpha = 1.0;
313  p->alphavel = -1.0 / (3.0+frand()*0.5);
314  p->color = color8;
315  for (j=0 ; j<3 ; j++)
316  {
317  p->org[j] = move[j] + crand()*3;
318  p->accel[j] = 0;
319  }
320  p->vel[0] = 0;
321  p->vel[1] = 0;
322  p->vel[2] = -40 - (crand()*10);
323 #endif
324 
325  }
326 
327  VectorAdd (move, vec, move);
328  }
329 }
330 
331 void CL_FlameEffects (centity_t *ent, vec3_t origin)
332 {
333  int n, count;
334  int j;
335  cparticle_t *p;
336 
337  count = rand() & 0xF;
338 
339  for(n=0;n<count;n++)
340  {
341  if (!free_particles)
342  return;
343 
344  p = free_particles;
345  free_particles = p->next;
346  p->next = active_particles;
347  active_particles = p;
348 
349  VectorClear (p->accel);
350  p->time = cl.time;
351 
352  p->alpha = 1.0;
353  p->alphavel = -1.0 / (1+frand()*0.2);
354 #ifndef QMAX
355  p->color = 226 + (rand() % 4);
356 #endif
357  for (j=0 ; j<3 ; j++)
358  {
359  p->org[j] = origin[j] + crand()*5;
360  p->vel[j] = crand()*5;
361  }
362  p->vel[2] = crand() * -10;
363  p->accel[2] = -PARTICLE_GRAVITY;
364  }
365 
366  count = rand() & 0x7;
367 
368  for(n=0;n<count;n++)
369  {
370  if (!free_particles)
371  return;
372  p = free_particles;
373  free_particles = p->next;
374  p->next = active_particles;
375  active_particles = p;
376  VectorClear (p->accel);
377 
378  p->time = cl.time;
379 
380  p->alpha = 1.0;
381  p->alphavel = -1.0 / (1+frand()*0.5);
382 #ifndef QMAX
383  p->color = 0 + (rand() % 4);
384 #endif
385  for (j=0 ; j<3 ; j++)
386  {
387  p->org[j] = origin[j] + crand()*3;
388  }
389  p->vel[2] = 20 + crand()*5;
390  }
391 
392 }
393 
394 
395 /*
396 ===============
397 CL_GenericParticleEffect
398 ===============
399 */
400 void CL_GenericParticleEffect (vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel)
401 {
402  int i, j;
403  cparticle_t *p;
404  float d;
405 
406  for (i=0 ; i<count ; i++)
407  {
408  if (!free_particles)
409  return;
410  p = free_particles;
411  free_particles = p->next;
412  p->next = active_particles;
413  active_particles = p;
414 
415  p->time = cl.time;
416 #ifndef QMAX
417  if (numcolors > 1)
418  p->color = color + (rand() & numcolors);
419  else
420  p->color = color;
421 #endif
422  d = rand() & dirspread;
423  for (j=0 ; j<3 ; j++)
424  {
425  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
426  p->vel[j] = crand()*20;
427  }
428 
429  p->accel[0] = p->accel[1] = 0;
430  p->accel[2] = -PARTICLE_GRAVITY;
431 // VectorCopy (accel, p->accel);
432  p->alpha = 1.0;
433 
434  p->alphavel = -1.0 / (0.5 + frand()*alphavel);
435 // p->alphavel = alphavel;
436  }
437 }
438 
439 /*
440 ===============
441 CL_BubbleTrail2 (lets you control the # of bubbles by setting the distance between the spawns)
442 
443 ===============
444 */
445 void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist)
446 {
447  vec3_t move;
448  vec3_t vec;
449  float len;
450  int i;
451 #ifndef QMAX
452  int j;
453  cparticle_t *p;
454 #endif
455  float dec;
456 
457  VectorCopy (start, move);
458  VectorSubtract (end, start, vec);
459  len = VectorNormalize (vec);
460 
461  dec = dist;
462  VectorScale (vec, dec, vec);
463 
464  for (i=0 ; i<len ; i+=dec)
465  {
466 #ifdef QMAX
467  setupParticle (
468  0, 0, 0,
469  move[0]+crand()*2, move[1]+crand()*2, move[2]+crand()*2,
470  crand()*5, crand()*5, crand()*5+6,
471  0, 0, 0,
472  255, 255, 255,
473  0, 0, 0,
474  0.75, -1.0 / (1 + frand() * 0.2),
475  (frand()>0.25)? 1 : (frand()>0.5) ? 2 : (frand()>0.75) ? 3 : 4, 1,
477  PART_TRANS|PART_SHADED,
478  NULL,0);
479 #else
480  if (!free_particles)
481  return;
482 
483  p = free_particles;
484  free_particles = p->next;
485  p->next = active_particles;
486  active_particles = p;
487 
488  VectorClear (p->accel);
489  p->time = cl.time;
490 
491  p->alpha = 1.0;
492  p->alphavel = -1.0 / (1+frand()*0.1);
493  p->color = 4 + (rand()&7);
494  for (j=0 ; j<3 ; j++)
495  {
496  p->org[j] = move[j] + crand()*2;
497  p->vel[j] = crand()*10;
498  }
499  p->org[2] -= 4;
500 // p->vel[2] += 6;
501  p->vel[2] += 20;
502 #endif
503  VectorAdd (move, vec, move);
504  }
505 }
506 
507 //#define CORKSCREW 1
508 //#define DOUBLE_SCREW 1
509 #define RINGS 1
510 //#define SPRAY 1
511 
512 #ifdef CORKSCREW
513 void CL_Heatbeam (vec3_t start, vec3_t end)
514 {
515  vec3_t move;
516  vec3_t vec;
517  float len;
518  int j,k;
519  cparticle_t *p;
520  vec3_t right, up;
521  int i;
522  float d, c, s;
523  vec3_t dir;
524  float ltime;
525  float step = 5.0;
526 
527  VectorCopy (start, move);
528  VectorSubtract (end, start, vec);
529  len = VectorNormalize (vec);
530 
531 // MakeNormalVectors (vec, right, up);
533  VectorCopy (cl.v_up, up);
534  VectorMA (move, -1, right, move);
535  VectorMA (move, -1, up, move);
536 
537  VectorScale (vec, step, vec);
538  ltime = (float) cl.time/1000.0;
539 
540 // for (i=0 ; i<len ; i++)
541  for (i=0 ; i<len ; i+=step)
542  {
543  d = i * 0.1 - fmod(ltime,16.0)*M_PI;
544  c = cos(d)/1.75;
545  s = sin(d)/1.75;
546 #ifdef DOUBLE_SCREW
547  for (k=-1; k<2; k+=2)
548  {
549 #else
550  k=1;
551 #endif
552  if (!free_particles)
553  return;
554 
555  p = free_particles;
556  free_particles = p->next;
557  p->next = active_particles;
558  active_particles = p;
559 
560  p->time = cl.time;
561  VectorClear (p->accel);
562 
563  p->alpha = 0.5;
564  // p->alphavel = -1.0 / (1+frand()*0.2);
565  // only last one frame!
567  // p->color = 0x74 + (rand()&7);
568 // p->color = 223 - (rand()&7);
569 #ifndef QMAX
570  p->color = 223;
571 #endif
572 // p->color = 240;
573 
574  // trim it so it looks like it's starting at the origin
575  if (i < 10)
576  {
577  VectorScale (right, c*(i/10.0)*k, dir);
578  VectorMA (dir, s*(i/10.0)*k, up, dir);
579  }
580  else
581  {
582  VectorScale (right, c*k, dir);
583  VectorMA (dir, s*k, up, dir);
584  }
585 #ifdef QMAX
586  setupParticle (
587  0, 0, 0,
588  move[0]+dir[0]*3, move[1]+dir[1]*3, move[2]+dir[2]*3,
589  0, 0, 0,
590  0, 0, 0,
591  200+rand()*50, 200+rand()*25, rand()*50,
592  0, 0, 0,
593  0.5, -1000.0,
594  3, 1,
596  0,
597  NULL,0);
598 #else
599  for (j=0 ; j<3 ; j++)
600  {
601  p->org[j] = move[j] + dir[j]*3;
602  // p->vel[j] = dir[j]*6;
603  p->vel[j] = 0;
604  }
605 #endif
606 #ifdef DOUBLE_SCREW
607  }
608 #endif
609  VectorAdd (move, vec, move);
610  }
611 }
612 #endif
613 #ifdef RINGS
614 //void CL_Heatbeam (vec3_t start, vec3_t end)
616 {
617  vec3_t move;
618  vec3_t vec;
619  float len;
620  int j;
621  cparticle_t *p;
622  vec3_t right, up;
623  int i;
624  float c, s;
625  vec3_t dir;
626  float ltime;
627  float step = 32.0, rstep;
628  float start_pt;
629  float rot;
630  float variance;
631  vec3_t end;
632 
633  VectorMA (start, 4096, forward, end);
634 
635  VectorCopy (start, move);
636  VectorSubtract (end, start, vec);
637  len = VectorNormalize (vec);
638 
639  // FIXME - pmm - these might end up using old values?
640 // MakeNormalVectors (vec, right, up);
642  VectorCopy (cl.v_up, up);
643  if (vidref_val == VIDREF_GL)
644  { // GL mode
645  VectorMA (move, -0.5, right, move);
646  VectorMA (move, -0.5, up, move);
647  }
648  // otherwise assume SOFT
649 
650  ltime = (float) cl.time/1000.0;
651  start_pt = fmod(ltime*96.0,step);
652  VectorMA (move, start_pt, vec, move);
653 
654  VectorScale (vec, step, vec);
655 
656 // Com_Printf ("%f\n", ltime);
657  rstep = M_PI/10.0;
658  for (i=start_pt ; i<len ; i+=step)
659  {
660  if (i>step*5) // don't bother after the 5th ring
661  break;
662 
663  for (rot = 0; rot < M_PI*2; rot += rstep)
664  {
665 
666  if (!free_particles)
667  return;
668 
669  p = free_particles;
670  free_particles = p->next;
671  p->next = active_particles;
672  active_particles = p;
673 
674  p->time = cl.time;
675  VectorClear (p->accel);
676 // rot+= fmod(ltime, 12.0)*M_PI;
677 // c = cos(rot)/2.0;
678 // s = sin(rot)/2.0;
679 // variance = 0.4 + ((float)rand()/(float)RAND_MAX) *0.2;
680  variance = 0.5;
681  c = cos(rot)*variance;
682  s = sin(rot)*variance;
683 
684  // trim it so it looks like it's starting at the origin
685  if (i < 10)
686  {
687  VectorScale (right, c*(i/10.0), dir);
688  VectorMA (dir, s*(i/10.0), up, dir);
689  }
690  else
691  {
692  VectorScale (right, c, dir);
693  VectorMA (dir, s, up, dir);
694  }
695 
696  p->alpha = 0.5;
697  // p->alphavel = -1.0 / (1+frand()*0.2);
698  p->alphavel = -1000.0;
699  // p->color = 0x74 + (rand()&7);
700 #ifndef QMAX
701  p->color = 223 - (rand()&7);
702 #endif
703  for (j=0 ; j<3 ; j++)
704  {
705  p->org[j] = move[j] + dir[j]*3;
706  // p->vel[j] = dir[j]*6;
707  p->vel[j] = 0;
708  }
709  }
710  VectorAdd (move, vec, move);
711  }
712 }
713 #endif
714 #ifdef SPRAY
715 void CL_Heatbeam (vec3_t start, vec3_t end)
716 {
717  vec3_t move;
718  vec3_t vec;
719  float len;
720  int j;
721  cparticle_t *p;
723  int i;
724  float d, c, s;
725  vec3_t dir;
726  float ltime;
727  float step = 32.0, rstep;
728  float start_pt;
729  float rot;
730 
731  VectorCopy (start, move);
732  VectorSubtract (end, start, vec);
733  len = VectorNormalize (vec);
734 
735 // MakeNormalVectors (vec, right, up);
738  VectorCopy (cl.v_up, up);
739  VectorMA (move, -0.5, right, move);
740  VectorMA (move, -0.5, up, move);
741 
742  for (i=0; i<8; i++)
743  {
744  if (!free_particles)
745  return;
746 
747  p = free_particles;
748  free_particles = p->next;
749  p->next = active_particles;
750  active_particles = p;
751 
752  p->time = cl.time;
753  VectorClear (p->accel);
754 
755  d = crand()*M_PI;
756  c = cos(d)*30;
757  s = sin(d)*30;
758 
759  p->alpha = 1.0;
760  p->alphavel = -5.0 / (1+frand());
761 #ifndef QMAX
762  p->color = 223 - (rand()&7);
763 #endif
764  for (j=0 ; j<3 ; j++)
765  {
766  p->org[j] = move[j];
767  }
768  VectorScale (vec, 450, p->vel);
769  VectorMA (p->vel, c, right, p->vel);
770  VectorMA (p->vel, s, up, p->vel);
771  }
772 /*
773 
774  ltime = (float) cl.time/1000.0;
775  start_pt = fmod(ltime*16.0,step);
776  VectorMA (move, start_pt, vec, move);
777 
778  VectorScale (vec, step, vec);
779 
780 // Com_Printf ("%f\n", ltime);
781  rstep = M_PI/12.0;
782  for (i=start_pt ; i<len ; i+=step)
783  {
784  if (i>step*5) // don't bother after the 5th ring
785  break;
786 
787  for (rot = 0; rot < M_PI*2; rot += rstep)
788  {
789  if (!free_particles)
790  return;
791 
792  p = free_particles;
793  free_particles = p->next;
794  p->next = active_particles;
795  active_particles = p;
796 
797  p->time = cl.time;
798  VectorClear (p->accel);
799 // rot+= fmod(ltime, 12.0)*M_PI;
800 // c = cos(rot)/2.0;
801 // s = sin(rot)/2.0;
802  c = cos(rot)/1.5;
803  s = sin(rot)/1.5;
804 
805  // trim it so it looks like it's starting at the origin
806  if (i < 10)
807  {
808  VectorScale (right, c*(i/10.0), dir);
809  VectorMA (dir, s*(i/10.0), up, dir);
810  }
811  else
812  {
813  VectorScale (right, c, dir);
814  VectorMA (dir, s, up, dir);
815  }
816 
817  p->alpha = 0.5;
818  // p->alphavel = -1.0 / (1+frand()*0.2);
819  p->alphavel = -1000.0;
820  // p->color = 0x74 + (rand()&7);
821 #ifndef QMAX
822  p->color = 223 - (rand()&7);
823 #endif
824  for (j=0 ; j<3 ; j++)
825  {
826  p->org[j] = move[j] + dir[j]*3;
827  // p->vel[j] = dir[j]*6;
828  p->vel[j] = 0;
829  }
830  }
831  VectorAdd (move, vec, move);
832  }
833 */
834 }
835 #endif
836 
837 /*
838 ===============
839 CL_ParticleSteamEffect
840 
841 Puffs with velocity along direction, with some randomness thrown in
842 ===============
843 */
844 void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude)
845 {
846  int i, j;
847  cparticle_t *p;
848  float d;
849  vec3_t r, u;
850 
851 // vectoangles2 (dir, angle_dir);
852 // AngleVectors (angle_dir, f, r, u);
853 
854  MakeNormalVectors (dir, r, u);
855 
856  for (i=0 ; i<count ; i++)
857  {
858  if (!free_particles)
859  return;
860  p = free_particles;
861  free_particles = p->next;
862  p->next = active_particles;
863  active_particles = p;
864 
865  p->time = cl.time;
866 #ifndef QMAX
867  p->color = color + (rand()&7);
868 #endif
869  for (j=0 ; j<3 ; j++)
870  {
871  p->org[j] = org[j] + magnitude*0.1*crand();
872 // p->vel[j] = dir[j]*magnitude;
873  }
874  VectorScale (dir, magnitude, p->vel);
875  d = crand()*magnitude/3;
876  VectorMA (p->vel, d, r, p->vel);
877  d = crand()*magnitude/3;
878  VectorMA (p->vel, d, u, p->vel);
879 
880  p->accel[0] = p->accel[1] = 0;
881  p->accel[2] = -PARTICLE_GRAVITY/2;
882  p->alpha = 1.0;
883 
884  p->alphavel = -1.0 / (0.5 + frand()*0.3);
885  }
886 }
887 
889 //vec3_t org, vec3_t dir, int color, int count, int magnitude)
890 {
891  int i, j;
892  cparticle_t *p;
893  float d;
894  vec3_t r, u;
895  vec3_t dir;
896 
897 // vectoangles2 (dir, angle_dir);
898 // AngleVectors (angle_dir, f, r, u);
899 
900  VectorCopy (self->dir, dir);
901  MakeNormalVectors (dir, r, u);
902 
903  for (i=0 ; i<self->count ; i++)
904  {
905  if (!free_particles)
906  return;
907  p = free_particles;
908  free_particles = p->next;
909  p->next = active_particles;
910  active_particles = p;
911 
912  p->time = cl.time;
913 #ifndef QMAX
914  p->color = self->color + (rand()&7);
915 #endif
916  for (j=0 ; j<3 ; j++)
917  {
918  p->org[j] = self->org[j] + self->magnitude*0.1*crand();
919 // p->vel[j] = dir[j]*magnitude;
920  }
921  VectorScale (dir, self->magnitude, p->vel);
922  d = crand()*self->magnitude/3;
923  VectorMA (p->vel, d, r, p->vel);
924  d = crand()*self->magnitude/3;
925  VectorMA (p->vel, d, u, p->vel);
926 
927  p->accel[0] = p->accel[1] = 0;
928  p->accel[2] = -PARTICLE_GRAVITY/2;
929  p->alpha = 1.0;
930 
931  p->alphavel = -1.0 / (0.5 + frand()*0.3);
932  }
933  self->nextthink += self->thinkinterval;
934 }
935 
936 /*
937 ===============
938 CL_TrackerTrail
939 ===============
940 */
941 void CL_TrackerTrail (vec3_t start, vec3_t end, int particleColor)
942 {
943  vec3_t move;
944  vec3_t vec;
945  vec3_t forward,right,up,angle_dir;
946  float len;
947  int j;
948  cparticle_t *p;
949  int dec;
950  float dist;
951 
952  VectorCopy (start, move);
953  VectorSubtract (end, start, vec);
954  len = VectorNormalize (vec);
955 
956  VectorCopy(vec, forward);
957  vectoangles2 (forward, angle_dir);
958  AngleVectors (angle_dir, forward, right, up);
959 
960  dec = 3;
961  VectorScale (vec, 3, vec);
962 
963  // FIXME: this is a really silly way to have a loop
964  while (len > 0)
965  {
966  len -= dec;
967 
968  if (!free_particles)
969  return;
970  p = free_particles;
971  free_particles = p->next;
972  p->next = active_particles;
973  active_particles = p;
974  VectorClear (p->accel);
975 
976  p->time = cl.time;
977 
978  p->alpha = 1.0;
979  p->alphavel = -2.0;
980 #ifndef QMAX
981  p->color = particleColor;
982 #endif
983  dist = DotProduct(move, forward);
984  VectorMA(move, 8 * cos(dist), up, p->org);
985  for (j=0 ; j<3 ; j++)
986  {
987 // p->org[j] = move[j] + crand();
988  p->vel[j] = 0;
989  p->accel[j] = 0;
990  }
991  p->vel[2] = 5;
992 
993  VectorAdd (move, vec, move);
994  }
995 }
996 
998 {
999  vec3_t dir;
1000  int i;
1001  cparticle_t *p;
1002 
1003  for(i=0;i<300;i++)
1004  {
1005  if (!free_particles)
1006  return;
1007  p = free_particles;
1008  free_particles = p->next;
1009  p->next = active_particles;
1010  active_particles = p;
1011  VectorClear (p->accel);
1012 
1013  p->time = cl.time;
1014 
1015  p->alpha = 1.0;
1017 #ifndef QMAX
1018  p->color = 0;
1019 #endif
1020  dir[0] = crand();
1021  dir[1] = crand();
1022  dir[2] = crand();
1023  VectorNormalize(dir);
1024 
1025  VectorMA(origin, 40, dir, p->org);
1026  }
1027 }
1028 
1030 {
1031  vec3_t dir;
1032  int i;
1033  cparticle_t *p;
1034 
1035  for(i=0;i<40;i++)
1036  {
1037  if (!free_particles)
1038  return;
1039  p = free_particles;
1040  free_particles = p->next;
1041  p->next = active_particles;
1042  active_particles = p;
1043  VectorClear (p->accel);
1044 
1045  p->time = cl.time;
1046 
1047  p->alpha = 1.0;
1049 #ifndef QMAX
1050  p->color = 0xe0;
1051 #endif
1052  dir[0] = crand();
1053  dir[1] = crand();
1054  dir[2] = crand();
1055  VectorNormalize(dir);
1056 
1057  VectorMA(origin, 10, dir, p->org);
1058 // VectorMA(origin, 10*(((rand () & 0x7fff) / ((float)0x7fff))), dir, p->org);
1059  }
1060 }
1061 
1063 {
1064  vec3_t dir;
1065  int i;
1066  cparticle_t *p;
1067 #ifndef QMAX
1068  static int colortable[4] = {2*8,13*8,21*8,18*8};
1069 #endif
1070  float ratio;
1071 
1072  ratio = 1.0 - (((float)self->endtime - (float)cl.time)/2100.0);
1073 
1074  for(i=0;i<300;i++)
1075  {
1076  if (!free_particles)
1077  return;
1078  p = free_particles;
1079  free_particles = p->next;
1080  p->next = active_particles;
1081  active_particles = p;
1082  VectorClear (p->accel);
1083 
1084  p->time = cl.time;
1085 
1086  p->alpha = 1.0;
1088 #ifndef QMAX
1089  p->color = colortable[rand()&3];
1090 #endif
1091  dir[0] = crand();
1092  dir[1] = crand();
1093  dir[2] = crand();
1094  VectorNormalize(dir);
1095 
1096  VectorMA(self->org, (45.0 * ratio), dir, p->org);
1097 // VectorMA(origin, 10*(((rand () & 0x7fff) / ((float)0x7fff))), dir, p->org);
1098  }
1099 }
1100 
1102 {
1103  vec3_t dir;
1104  int i;
1105  cparticle_t *p;
1106 #ifndef QMAX
1107  static int colortable[4] = {110, 112, 114, 116};
1108 #endif
1109  float ratio;
1110 
1111  ratio = 1.0 - (((float)self->endtime - (float)cl.time)/1000.0);
1112 
1113  for(i=0;i<700;i++)
1114  {
1115  if (!free_particles)
1116  return;
1117  p = free_particles;
1118  free_particles = p->next;
1119  p->next = active_particles;
1120  active_particles = p;
1121  VectorClear (p->accel);
1122 
1123  p->time = cl.time;
1124 
1125  p->alpha = 1.0;
1127 #ifndef QMAX
1128  p->color = colortable[rand()&3];
1129 #endif
1130  dir[0] = crand();
1131  dir[1] = crand();
1132  dir[2] = crand();
1133  VectorNormalize(dir);
1134 
1135  VectorMA(self->org, (200.0 * ratio), dir, p->org);
1136 // VectorMA(origin, 10*(((rand () & 0x7fff) / ((float)0x7fff))), dir, p->org);
1137  }
1138 }
1139 
1141 {
1142 #ifndef QMAX
1143  static int colortable[4] = {2*8,13*8,21*8,18*8};
1144 #endif
1145  int i;
1146  cparticle_t *p;
1147  vec3_t dir;
1148 
1149  for (i=0 ; i<256 ; i++)
1150  {
1151  if (!free_particles)
1152  return;
1153  p = free_particles;
1154  free_particles = p->next;
1155  p->next = active_particles;
1156  active_particles = p;
1157 
1158  p->time = cl.time;
1159 #ifndef QMAX
1160  p->color = colortable[rand()&3];
1161 #endif
1162  dir[0] = crand();
1163  dir[1] = crand();
1164  dir[2] = crand();
1165  VectorNormalize(dir);
1166  VectorMA(org, 45.0, dir, p->org);
1167  VectorMA(vec3_origin, 40.0, dir, p->vel);
1168 
1169  p->accel[0] = p->accel[1] = 0;
1170  p->alpha = 1.0;
1171 
1172  p->alphavel = -0.8 / (0.5 + frand()*0.3);
1173  }
1174 
1175 }
1176 
1178 {
1179  vec3_t dir, backdir;
1180  int i;
1181  cparticle_t *p;
1182 
1183  for(i=0;i<300;i++)
1184  {
1185  if (!free_particles)
1186  return;
1187  p = free_particles;
1188  free_particles = p->next;
1189  p->next = active_particles;
1190  active_particles = p;
1191  VectorClear (p->accel);
1192 
1193  p->time = cl.time;
1194 
1195  p->alpha = 1.0;
1196  p->alphavel = -1.0;
1197 #ifndef QMAX
1198  p->color = 0;
1199 #endif
1200  dir[0] = crand();
1201  dir[1] = crand();
1202  dir[2] = crand();
1203  VectorNormalize(dir);
1204  VectorScale(dir, -1, backdir);
1205 
1206  VectorMA(origin, 64, dir, p->org);
1207  VectorScale(backdir, 64, p->vel);
1208  }
1209 
1210 }
1211 
1212 /*
1213 ===============
1214 CL_TagTrail
1215 
1216 ===============
1217 */
1218 void CL_TagTrail (vec3_t start, vec3_t end, float color)
1219 {
1220  vec3_t move;
1221  vec3_t vec;
1222  float len;
1223  int j;
1224  cparticle_t *p;
1225  int dec;
1226 
1227  VectorCopy (start, move);
1228  VectorSubtract (end, start, vec);
1229  len = VectorNormalize (vec);
1230 
1231  dec = 5;
1232  VectorScale (vec, 5, vec);
1233 
1234  while (len >= 0)
1235  {
1236  len -= dec;
1237 
1238  if (!free_particles)
1239  return;
1240  p = free_particles;
1241  free_particles = p->next;
1242  p->next = active_particles;
1243  active_particles = p;
1244  VectorClear (p->accel);
1245 
1246  p->time = cl.time;
1247 
1248  p->alpha = 1.0;
1249  p->alphavel = -1.0 / (0.8+frand()*0.2);
1250 #ifndef QMAX
1251  p->color = color;
1252 #endif
1253  for (j=0 ; j<3 ; j++)
1254  {
1255  p->org[j] = move[j] + crand()*16;
1256  p->vel[j] = crand()*5;
1257  p->accel[j] = 0;
1258  }
1259 
1260  VectorAdd (move, vec, move);
1261  }
1262 }
1263 
1264 /*
1265 ===============
1266 CL_ColorExplosionParticles
1267 ===============
1268 */
1269 void CL_ColorExplosionParticles (vec3_t org, int color8, int run)
1270 {
1271  int i;
1272 #ifdef QMAX
1273  vec3_t color = { color8red(color8), color8green(color8), color8blue(color8)};
1274 #else
1275  int j;
1276  cparticle_t *p;
1277 #endif
1278  for (i=0 ; i<128 ; i++)
1279  {
1280 #ifdef QMAX
1281 setupParticle (
1282  0, 0, 0,
1283  org[0] + ((rand()%32)-16), org[1] + ((rand()%32)-16), org[2] + ((rand()%32)-16),
1284  (rand()%256)-128, (rand()%256)-128, (rand()%256)-128,
1285  0, 0, 20,
1286  color[0] + (rand() % run), color[1] + (rand() % run), color[2] + (rand() % run),
1287  0, 0, 0,
1288  1.0, -0.4 / (0.6 + frand()*0.2),
1289  2, 1,
1291  0,
1292  NULL,0);
1293 #else
1294  if (!free_particles)
1295  return;
1296  p = free_particles;
1297  free_particles = p->next;
1298  p->next = active_particles;
1299  active_particles = p;
1300 
1301  p->time = cl.time;
1302  p->color = color8 + (rand() % run);
1303  for (j=0 ; j<3 ; j++)
1304  {
1305  p->org[j] = org[j] + ((rand()%32)-16);
1306  p->vel[j] = (rand()%256)-128;
1307  }
1308 
1309  p->accel[0] = p->accel[1] = 0;
1310  p->accel[2] = -PARTICLE_GRAVITY;
1311  p->alpha = 1.0;
1312 
1313  p->alphavel = -0.4 / (0.6 + frand()*0.2);
1314 #endif
1315  }
1316 }
1317 
1318 /*
1319 ===============
1320 CL_ParticleSmokeEffect - like the steam effect, but unaffected by gravity
1321 ===============
1322 */
1323 #ifdef QMAX
1324 void pRotateThink (cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
1325 {
1326  angle[2] = angle[0] + *time*angle[1] + *time**time*angle[2];
1327  p->thinknext=true;
1328 }
1329 #endif
1330 
1331 void CL_ParticleSmokeEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude)
1332 {
1333  int i, j;
1334  cparticle_t *p;
1335  float d;
1336  vec3_t r, u;
1337 
1338  MakeNormalVectors (dir, r, u);
1339 
1340  for (i=0 ; i<count ; i++)
1341  {
1342  if (!free_particles)
1343  return;
1344  p = free_particles;
1345  free_particles = p->next;
1346  p->next = active_particles;
1347  active_particles = p;
1348 
1349  p->time = cl.time;
1350 #ifndef QMAX
1351  p->color = color + (rand()&7);
1352 #endif
1353  for (j=0 ; j<3 ; j++)
1354  {
1355  p->org[j] = org[j] + magnitude*0.1*crand();
1356 // p->vel[j] = dir[j]*magnitude;
1357  }
1358  VectorScale (dir, magnitude, p->vel);
1359  d = crand()*magnitude/3;
1360  VectorMA (p->vel, d, r, p->vel);
1361  d = crand()*magnitude/3;
1362  VectorMA (p->vel, d, u, p->vel);
1363 
1364  p->accel[0] = p->accel[1] = p->accel[2] = 0;
1365  p->alpha = 1.0;
1366 
1367  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1368  }
1369 }
1370 
1371 /*
1372 ===============
1373 CL_BlasterParticles2
1374 
1375 Wall impact puffs (Green)
1376 ===============
1377 */
1378 void CL_BlasterParticles2 (vec3_t org, vec3_t dir, unsigned int color)
1379 {
1380  int i, j;
1381  cparticle_t *p;
1382  float d;
1383  int count;
1384 
1385  count = 40;
1386  for (i=0 ; i<count ; i++)
1387  {
1388  if (!free_particles)
1389  return;
1390  p = free_particles;
1391  free_particles = p->next;
1392  p->next = active_particles;
1393  active_particles = p;
1394 
1395  p->time = cl.time;
1396 #ifndef QMAX
1397  p->color = color + (rand()&7);
1398 #endif
1399  d = rand()&15;
1400  for (j=0 ; j<3 ; j++)
1401  {
1402  p->org[j] = org[j] + ((rand()&7)-4) + d*dir[j];
1403  p->vel[j] = dir[j] * 30 + crand()*40;
1404  }
1405 
1406  p->accel[0] = p->accel[1] = 0;
1407  p->accel[2] = -PARTICLE_GRAVITY;
1408  p->alpha = 1.0;
1409 
1410  p->alphavel = -1.0 / (0.5 + frand()*0.3);
1411  }
1412 }
1413 
1414 /*
1415 ===============
1416 CL_BlasterTrail2
1417 
1418 Green!
1419 ===============
1420 */
1421 void CL_BlasterTrail2 (vec3_t start, vec3_t end)
1422 {
1423  vec3_t move;
1424  vec3_t vec;
1425  float len;
1426  int j;
1427  cparticle_t *p;
1428  int dec;
1429 
1430  VectorCopy (start, move);
1431  VectorSubtract (end, start, vec);
1432  len = VectorNormalize (vec);
1433 
1434  dec = 5;
1435  VectorScale (vec, 5, vec);
1436 
1437  // FIXME: this is a really silly way to have a loop
1438  while (len > 0)
1439  {
1440  len -= dec;
1441 
1442  if (!free_particles)
1443  return;
1444  p = free_particles;
1445  free_particles = p->next;
1446  p->next = active_particles;
1447  active_particles = p;
1448  VectorClear (p->accel);
1449 
1450  p->time = cl.time;
1451 
1452  p->alpha = 1.0;
1453  p->alphavel = -1.0 / (0.3+frand()*0.2);
1454 #ifndef QMAX
1455  p->color = 0xd0;
1456 #endif
1457  for (j=0 ; j<3 ; j++)
1458  {
1459  p->org[j] = move[j] + crand();
1460  p->vel[j] = crand()*5;
1461  p->accel[j] = 0;
1462  }
1463 
1464  VectorAdd (move, vec, move);
1465  }
1466 }
CL_SmokeTrail
void CL_SmokeTrail(vec3_t start, vec3_t end, int colorStart, int colorRun, int spacing)
Definition: cl_newfx.c:216
particle_s::vel
vec3_t vel
Definition: client.h:416
YAW
#define YAW
Definition: q_shared.h:66
CL_WidowSplash
void CL_WidowSplash(vec3_t org)
Definition: cl_newfx.c:1140
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
cdlight_t::radius
float radius
Definition: client.h:339
client_state_t::v_forward
vec3_t v_forward
Definition: client.h:153
particle_s::time
float time
Definition: client.h:413
client_state_t::v_up
vec3_t v_up
Definition: client.h:153
cl_sustain
Definition: client.h:366
particle_s::accel
vec3_t accel
Definition: client.h:417
CL_AllocDlight
cdlight_t * CL_AllocDlight(int key)
Definition: cl_fx.c:249
frand
float frand(void)
Definition: common.c:1398
cdlight_t::die
float die
Definition: client.h:340
cdlight_t
Definition: client.h:334
CL_ParticleSmokeEffect
void CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:1331
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
qboolean
qboolean
Definition: q_shared.h:56
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
i
int i
Definition: q_shared.c:305
CL_Tracker_Shell
void CL_Tracker_Shell(vec3_t origin)
Definition: cl_newfx.c:997
particle_s::org
vec3_t org
Definition: client.h:415
PITCH
#define PITCH
Definition: q_shared.h:65
CL_DebugTrail
void CL_DebugTrail(vec3_t start, vec3_t end)
Definition: cl_newfx.c:140
CL_GenericParticleEffect
void CL_GenericParticleEffect(vec3_t org, vec3_t dir, int color, int count, int numcolors, int dirspread, float alphavel)
Definition: cl_newfx.c:400
particle_blaster
@ particle_blaster
Definition: particles.h:13
M_PI
#define M_PI
Definition: q_shared.h:135
free_particles
cparticle_t * free_particles
Definition: cl_newfx.c:24
CL_Heatbeam
void CL_Heatbeam(vec3_t start, vec3_t forward)
Definition: cl_newfx.c:615
cvar_s
Definition: q_shared.h:317
intensity
cvar_t * intensity
Definition: gl_image.c:30
vectoangles2
void vectoangles2(vec3_t value1, vec3_t angles)
Definition: cl_newfx.c:54
MakeNormalVectors
void MakeNormalVectors(vec3_t forward, vec3_t right, vec3_t up)
Definition: cl_fx.c:1669
j
GLint j
Definition: qgl_win.c:150
particle_s::next
struct particle_s * next
Definition: client.h:411
CL_Widowbeamout
void CL_Widowbeamout(cl_sustain_t *self)
Definition: cl_newfx.c:1062
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
active_particles
cparticle_t * active_particles
Definition: cl_fx.c:62
particle_s::alphavel
float alphavel
Definition: client.h:426
color8green
int color8green(int color8)
Definition: cl_fxmax.c:97
particle_bubble
@ particle_bubble
Definition: particles.h:12
particle_s
Definition: client.h:409
r
GLdouble GLdouble r
Definition: qgl_win.c:336
VIDREF_GL
#define VIDREF_GL
Definition: q_shared.h:1226
centity_t
Definition: client.h:75
ROLL
#define ROLL
Definition: q_shared.h:67
forward
static vec3_t forward
Definition: p_view.c:29
CL_TagTrail
void CL_TagTrail(vec3_t start, vec3_t end, float color)
Definition: cl_newfx.c:1218
CL_TrackerTrail
void CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
Definition: cl_newfx.c:941
CL_Flashlight
void CL_Flashlight(int ent, vec3_t pos)
Definition: cl_newfx.c:93
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:155
particle_s::alpha
float alpha
Definition: client.h:425
cdlight_t::color
vec3_t color
Definition: client.h:337
CL_ColorFlash
void CL_ColorFlash(vec3_t pos, int ent, int intensity, float r, float g, float b)
Definition: cl_newfx.c:112
CL_ColorExplosionParticles
void CL_ColorExplosionParticles(vec3_t org, int color8, int run)
Definition: cl_newfx.c:1269
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
NULL
#define NULL
Definition: q_shared.h:60
CL_ForceWall
void CL_ForceWall(vec3_t start, vec3_t end, int color8)
Definition: cl_newfx.c:261
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_MonsterPlasma_Shell
void CL_MonsterPlasma_Shell(vec3_t origin)
Definition: cl_newfx.c:1029
VIDREF_SOFT
#define VIDREF_SOFT
Definition: q_shared.h:1227
CL_Tracker_Explode
void CL_Tracker_Explode(vec3_t origin)
Definition: cl_newfx.c:1177
color8red
int color8red(int color8)
Definition: cl_fxmax.c:93
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
client_state_t::time
int time
Definition: client.h:147
CL_ParticleSteamEffect2
void CL_ParticleSteamEffect2(cl_sustain_t *self)
Definition: cl_newfx.c:888
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:157
CL_Nukeblast
void CL_Nukeblast(cl_sustain_t *self)
Definition: cl_newfx.c:1101
client_state_t::v_right
vec3_t v_right
Definition: client.h:153
particle_generic
@ particle_generic
Definition: particles.h:6
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
INSTANT_PARTICLE
#define INSTANT_PARTICLE
Definition: client.h:456
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
up
static vec3_t up
Definition: p_view.c:29
color8blue
int color8blue(int color8)
Definition: cl_fxmax.c:101
sqrt
double sqrt(double x)
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
CL_FlameEffects
void CL_FlameEffects(centity_t *ent, vec3_t origin)
Definition: cl_newfx.c:331
cdlight_t::minlight
float minlight
Definition: client.h:342
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fx.c:63
CL_BubbleTrail2
void CL_BubbleTrail2(vec3_t start, vec3_t end, int dist)
Definition: cl_newfx.c:445
cdlight_t::origin
vec3_t origin
Definition: client.h:338
vid_ref
cvar_t * vid_ref
Definition: vid_dll.c:43
right
GLdouble right
Definition: qgl_win.c:159
CL_BlasterTrail2
void CL_BlasterTrail2(vec3_t start, vec3_t end)
Definition: cl_newfx.c:1421
CL_BlasterParticles2
void CL_BlasterParticles2(vec3_t org, vec3_t dir, unsigned int color)
Definition: cl_newfx.c:1378
crand
float crand(void)
Definition: common.c:1403
cl
client_state_t cl
Definition: cl_main.c:106
PARTICLE_GRAVITY
#define PARTICLE_GRAVITY
Definition: client.h:453
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
vidref_val
int vidref_val
Definition: cl_ents.c:28
client.h
cl_numparticles
int cl_numparticles
Definition: cl_fx.c:65
particle_s::color
float color
Definition: client.h:422
pRotateThink
void pRotateThink(cparticle_t *p, vec3_t org, vec3_t angle, float *alpha, float *size, int *image, float *time)
count
GLint GLsizei count
Definition: qgl_win.c:128
CL_ParticleSteamEffect
void CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, int count, int magnitude)
Definition: cl_newfx.c:844
MAX_PARTICLES
#define MAX_PARTICLES
Definition: ref.h:27