码迷,mamicode.com
首页 > Web开发 > 详细

[MetaHook] R_SparkStreaks

时间:2015-08-04 22:35:49      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

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 }

 

[MetaHook] R_SparkStreaks

标签:

原文地址:http://www.cnblogs.com/crsky/p/4703088.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!