1 |
mr_bones_ 08/09/03 02:10:05 |
2 |
|
3 |
Added: xtux-20030306-particles.patch |
4 |
Log: |
5 |
add particle patch from Albert Zeyer (bug #236469) |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 games-arcade/xtux/files/xtux-20030306-particles.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/xtux/files/xtux-20030306-particles.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-arcade/xtux/files/xtux-20030306-particles.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: xtux-20030306-particles.patch |
15 |
=================================================================== |
16 |
diff -u -r xtux.old/src/client/particle.c xtux/src/client/particle.c |
17 |
--- xtux.old/src/client/particle.c 2008-09-02 20:34:24.000000000 +0200 |
18 |
+++ xtux/src/client/particle.c 2008-09-02 20:35:40.000000000 +0200 |
19 |
@@ -340,11 +340,11 @@ |
20 |
ptl->pos[i].y = src_y; |
21 |
d = dir + 128; |
22 |
d += i%SHARD_ANGLE - SHARD_ANGLE/2; |
23 |
- ptl->vel[i].x = sin_lookup[dir + 64 + rand()%64] * SHARD_EXP_VEL; |
24 |
- ptl->vel[i].y = -cos_lookup[dir + 64 + rand()%64] * SHARD_EXP_VEL; |
25 |
+ ptl->vel[i].x = sin_lookup[(dir + 64 + rand()%64) % DEGREES] * SHARD_EXP_VEL; |
26 |
+ ptl->vel[i].y = -cos_lookup[(dir + 64 + rand()%64) % DEGREES] * SHARD_EXP_VEL; |
27 |
vel = SHARD_MIN_VEL + (SHARD_MAX_VEL*rand()/(RAND_MAX+SHARD_MIN_VEL)); |
28 |
- ptl->vel[i].x += vel * sin_lookup[d] * 10; |
29 |
- ptl->vel[i].y += vel * -cos_lookup[d] * 10; |
30 |
+ ptl->vel[i].x += vel * sin_lookup[d % DEGREES] * 10; |
31 |
+ ptl->vel[i].y += vel * -cos_lookup[d % DEGREES] * 10; |
32 |
} |
33 |
|
34 |
ptl = particles_new(color2, PTL_TOP, num_sh2); |
35 |
@@ -357,8 +357,8 @@ |
36 |
ptl->vel[i].x = sin_lookup[rand()%256] * SHARD_EXP_VEL; |
37 |
ptl->vel[i].y = -cos_lookup[rand()%256] * SHARD_EXP_VEL; |
38 |
vel = SHARD_MIN_VEL + (SHARD_MAX_VEL*rand()/(RAND_MAX+SHARD_MIN_VEL)); |
39 |
- ptl->vel[i].x += vel * sin_lookup[d] * 20; |
40 |
- ptl->vel[i].y += vel * -cos_lookup[d] * 20; |
41 |
+ ptl->vel[i].x += vel * sin_lookup[d % DEGREES] * 20; |
42 |
+ ptl->vel[i].y += vel * -cos_lookup[d % DEGREES] * 20; |
43 |
} |
44 |
|
45 |
/* "Extra" particles (ie bullet holes) */ |