首页 > Web开发 > 详细

[MetaHook] R_SparkStreaks

时间:2015-08-04 22:34:53      阅读:277      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!