[MetaHook] R_SparkStreaks

By hzqst

 1 void R_SparkStreaks(vec_t *pos, int count, int velocityMin, int velocityMax)
 2 {
 3     int i;
 4     particle_t *p, *p2;
 5 
 6     i = 0;
 7     p = free_particles;
 8 
 9     while ( free_particles )
10     {
11         i ++;
12 
13         free_particles = p->next;
14         p2 = gpActiveTracers;
15         gpActiveTracers = p;
16         p->next = p2;
17 
18         p->die = RandomFloat(0.1, 0.5) + cl.time;
19         p->color = 5;
20         p->packedColor = 255;
21         p->type = pt_grav;
22         p->ramp = 0.5;
23         VectorCopy(pos, p->org);
24         p->vel[0] = RandomFloat(velocityMin, velocityMax);
25         p->vel[1] = RandomFloat(velocityMin, velocityMax);
26         p->vel[2] = RandomFloat(velocityMin, velocityMax);
27 
28         if(i == count)
29             break;
30 
31         p = free_particles;
32     }
33 }

 

posted @ 2015-08-04 20:47  Akatsuki-  阅读(198)  评论(0编辑  收藏  举报