Xonotic
effectinfo_nades.inc
Go to the documentation of this file.
1 #define nade(name, colormin1, colormax1, colormin2, colormax2) \
2  DEF(nade_##name); \
3  SUB(nade_##name) { \
4  MY(alpha_min) = 100; \
5  MY(alpha_max) = 100; \
6  MY(alpha_fade) = 250; \
7  MY(color_min) = colormin1; \
8  MY(color_max) = colormax1; \
9  MY(sizeincrease) = -1; \
10  MY(size_min) = 3; \
11  MY(size_max) = 3; \
12  MY(tex_min) = 65; \
13  MY(tex_max) = 65; \
14  MY(trailspacing) = 1; \
15  MY(type) = "smoke"; \
16  } \
17  SUB(nade_##name) /* fire */ { \
18  MY(alpha_min) = 30; \
19  MY(alpha_max) = 30; \
20  MY(alpha_fade) = 150; \
21  MY(color_min) = colormin2; \
22  MY(color_max) = colormax2; \
23  MY(notunderwater) = true; \
24  MY(sizeincrease) = -10; \
25  MY(size_min) = 15; \
26  MY(size_max) = 25; \
27  MY(tex_min) = 65; \
28  MY(tex_max) = 65; \
29  MY(trailspacing) = 8; \
30  MY(type) = "smoke"; \
31  } \
32  SUB(nade_##name) /* bubbles */ { \
33  MY(alpha_min) = 256; \
34  MY(alpha_max) = 256; \
35  MY(alpha_fade) = 256; \
36  MY(bounce) = 1.500000; \
37  MY(color_min) = colormin1; \
38  MY(color_max) = colormax1; \
39  MY(gravity) = -0.125000; \
40  MY(liquidfriction) = 4; \
41  MY(size_min) = 1; \
42  MY(size_max) = 1; \
43  MY(tex_min) = 62; \
44  MY(tex_max) = 62; \
45  MY(trailspacing) = 16; \
46  MY(type) = "bubble"; \
47  MY(underwater) = true; \
48  MY(velocityjitter) = '16.0 16.0 16.0'; \
49  } \
50 
51 
52 nade(blue, "0x006cff", "0x0600ff", "0x0600ff", "0x9794ff")
53 nade(red, "0xff0000", "0xff3c00", "0xff0000", "0xffa2a2")
54 nade(yellow, "0xFFFF0F", "0xFFFF0F", "0xFFFF0F", "0xFFFF0F")
55 nade(pink, "0xFF0FFF", "0xFF0FFF", "0xFF0FFF", "0xFF0FFF")
56 nade(neutral, "0xFFFFFF", "0xFFFFFF", "0xFFFFFF", "0xFFFFFF")
57 #undef nade
58 
59 #define nade_burn(name, colormin1, colormax1, colormin2, colormax2) \
60  DEF(nade_##name##_burn); \
61  SUB(nade_##name##_burn) { \
62  MY(alpha_min) = 100; \
63  MY(alpha_max) = 100; \
64  MY(alpha_fade) = 250; \
65  MY(color_min) = colormin1; \
66  MY(color_max) = colormax1; \
67  MY(sizeincrease) = -1; \
68  MY(size_min) = 5; \
69  MY(size_max) = 5; \
70  MY(tex_min) = 65; \
71  MY(tex_max) = 65; \
72  MY(trailspacing) = 1; \
73  MY(type) = "smoke"; \
74  } \
75  SUB(nade_##name##_burn) /* fire */ { \
76  MY(alpha_min) = 200; \
77  MY(alpha_max) = 200; \
78  MY(alpha_fade) = 1000; \
79  MY(color_min) = colormin2; \
80  MY(color_max) = colormax2; \
81  MY(notunderwater) = true; \
82  MY(sizeincrease) = -30; \
83  MY(size_min) = 45; \
84  MY(size_max) = 25; \
85  MY(tex_min) = 65; \
86  MY(tex_max) = 65; \
87  MY(trailspacing) = 64; \
88  MY(type) = "smoke"; \
89  } \
90  SUB(nade_##name##_burn) /* bubbles */ { \
91  MY(alpha_min) = 256; \
92  MY(alpha_max) = 256; \
93  MY(alpha_fade) = 256; \
94  MY(bounce) = 1.500000; \
95  MY(color_min) = colormin1; \
96  MY(color_max) = colormax1; \
97  MY(gravity) = -0.125000; \
98  MY(liquidfriction) = 4; \
99  MY(size_min) = 1; \
100  MY(size_max) = 1; \
101  MY(tex_min) = 62; \
102  MY(tex_max) = 62; \
103  MY(trailspacing) = 16; \
104  MY(type) = "bubble"; \
105  MY(underwater) = true; \
106  MY(velocityjitter) = '16.0 16.0 16.0'; \
107  } \
108  SUB(nade_##name##_burn) { \
109  MY(alpha_min) = 300; \
110  MY(alpha_max) = 900; \
111  MY(alpha_fade) = 1500; \
112  MY(color_min) = colormin1; \
113  MY(color_max) = colormax1; \
114  MY(originjitter) = '2.0 2.0 2.0'; \
115  MY(startangle_min) = -180; \
116  MY(startangle_max) = 180; \
117  MY(spin_min) = 20; \
118  MY(spin_max) = -20; \
119  MY(sizeincrease) = -40; \
120  MY(size_min) = 15; \
121  MY(size_max) = 25; \
122  MY(tex_min) = 71; \
123  MY(tex_max) = 73; \
124  MY(trailspacing) = 16; \
125  MY(type) = "smoke"; \
126  MY(velocityjitter) = '10.0 10.0 10.0'; \
127  } \
128 
129 
130 nade_burn(red, "0xff0000", "0xff3c00", "0xff0000", "0xffa2a2")
131 nade_burn(blue, "0x006cff", "0x0600ff", "0x0600ff", "0x9794ff")
132 nade_burn(yellow, "0xFFFF0F", "0xFFFF0F", "0xFFFF0F", "0xFFFF0F")
133 nade_burn(pink, "0xFF0FFF", "0xFF0FFF", "0xFF0FFF", "0xFF0FFF")
134 nade_burn(neutral, "0xFFFFFF", "0xFFFFFF", "0xFFFFFF", "0xFFFFFF")
135 #undef nade_burn
136 
137 #define nade_explode(name, colorlight, colormin1, colormax1, colormin2, colormax2, colormin3, colormax3) \
138  DEF(nade_##name##_explode); \
139  SUB(nade_##name##_explode) { \
140  MY(alpha_min) = 256; \
141  MY(alpha_max) = 256; \
142  MY(countabsolute) = 1; \
143  MY(lightcolor) = colorlight; \
144  MY(lightradiusfade) = 1500; \
145  MY(lightradius) = 300; \
146  MY(originjitter) = '26.0 26.0 26.0'; \
147  MY(size_min) = 88; \
148  MY(size_max) = 88; \
149  MY(tex_min) = 8; \
150  MY(tex_max) = 16; \
151  MY(type) = "decal"; \
152  } \
153  SUB(nade_##name##_explode) /* shockwave */ { \
154  MY(alpha_min) = 80; \
155  MY(alpha_max) = 80; \
156  MY(alpha_fade) = 650; \
157  MY(color_min) = colormin1; \
158  MY(color_max) = colormax1; \
159  MY(countabsolute) = 1; \
160  MY(sizeincrease) = 1800; \
161  MY(size_min) = 32; \
162  MY(size_max) = 32; \
163  MY(tex_min) = 33; \
164  MY(tex_max) = 33; \
165  MY(type) = "smoke"; \
166  MY(velocitymultiplier) = 44; \
167  } \
168  SUB(nade_##name##_explode) /* fire */ { \
169  MY(airfriction) = 30; \
170  MY(alpha_min) = 400; \
171  MY(alpha_max) = 656; \
172  MY(alpha_fade) = 2000; \
173  MY(color_min) = colormin2; \
174  MY(color_max) = colormax2; \
175  MY(count) = 16; \
176  MY(notunderwater) = true; \
177  MY(originjitter) = '50.0 50.0 50.0'; \
178  MY(startangle_min) = -180; \
179  MY(startangle_max) = 180; \
180  MY(spin_min) = -9; \
181  MY(spin_max) = 9; \
182  MY(sizeincrease) = 555; \
183  MY(size_min) = 20; \
184  MY(size_max) = 24; \
185  MY(tex_min) = 48; \
186  MY(tex_max) = 55; \
187  MY(type) = "smoke"; \
188  MY(velocityjitter) = '320.0 320.0 320.0'; \
189  } \
190  SUB(nade_##name##_explode) /* fire stretched */ { \
191  MY(airfriction) = -9; \
192  MY(alpha_min) = 1500; \
193  MY(alpha_max) = 3000; \
194  MY(alpha_fade) = 13000; \
195  MY(color_min) = colormin2; \
196  MY(color_max) = colormax2; \
197  MY(count) = 8; \
198  MY(sizeincrease) = 40; \
199  MY(size_min) = 60; \
200  MY(size_max) = 90; \
201  MY(stretchfactor) = 80; \
202  MY(tex_min) = 48; \
203  MY(tex_max) = 55; \
204  MY(type) = "spark"; \
205  MY(velocityjitter) = '30.0 30.0 30.0'; \
206  } \
207  SUB(nade_##name##_explode) /* smoke */ { \
208  MY(airfriction) = 0.040000; \
209  MY(alpha_min) = 128; \
210  MY(alpha_max) = 328; \
211  MY(alpha_fade) = 390; \
212  MY(blend) = "alpha"; \
213  MY(color_min) = "0x222222"; \
214  MY(color_max) = "0x000000"; \
215  MY(count) = 32; \
216  MY(gravity) = 0.400000; \
217  MY(originjitter) = '50.0 50.0 10.0'; \
218  MY(startangle_min) = -180; \
219  MY(startangle_max) = 180; \
220  MY(spin_min) = 2; \
221  MY(spin_max) = -2; \
222  MY(sizeincrease) = 50; \
223  MY(size_min) = 60; \
224  MY(size_max) = 30; \
225  MY(tex_max) = 7; \
226  MY(type) = "smoke"; \
227  MY(velocityjitter) = '200.0 200.0 200.0'; \
228  MY(velocityoffset) = '0.0 0.0 180.0'; \
229  } \
230  SUB(nade_##name##_explode) /* underwater bubbles */ { \
231  MY(alpha_min) = 128; \
232  MY(alpha_max) = 256; \
233  MY(alpha_fade) = 64; \
234  MY(bounce) = 1.500000; \
235  MY(color_min) = "0x404040"; \
236  MY(color_max) = "0x808080"; \
237  MY(count) = 32; \
238  MY(gravity) = -0.125000; \
239  MY(liquidfriction) = 0.250000; \
240  MY(originjitter) = '16.0 16.0 16.0'; \
241  MY(size_min) = 3; \
242  MY(size_max) = 6; \
243  MY(tex_min) = 62; \
244  MY(tex_max) = 62; \
245  MY(type) = "bubble"; \
246  MY(underwater) = true; \
247  MY(velocityjitter) = '196.0 196.0 196.0'; \
248  } \
249  SUB(nade_##name##_explode) /* bouncing sparks */ { \
250  MY(airfriction) = 1; \
251  MY(alpha_min) = 644; \
252  MY(alpha_max) = 956; \
253  MY(alpha_fade) = 484; \
254  MY(bounce) = 1.600000; \
255  MY(color_min) = colormin3; \
256  MY(color_max) = colormax3; \
257  MY(count) = 8; \
258  MY(gravity) = 1; \
259  MY(liquidfriction) = 0.800000; \
260  MY(notunderwater) = true; \
261  MY(originjitter) = '16.0 16.0 16.0'; \
262  MY(size_min) = 1; \
263  MY(size_max) = 2; \
264  MY(tex_min) = 40; \
265  MY(tex_max) = 40; \
266  MY(type) = "spark"; \
267  MY(velocityjitter) = '424.0 424.0 624.0'; \
268  MY(velocityoffset) = '0.0 0.0 80.0'; \
269  } \
270  SUB(nade_##name##_explode) /* notbouncing sparks */ { \
271  MY(airfriction) = 0.700000; \
272  MY(alpha_min) = 644; \
273  MY(alpha_max) = 956; \
274  MY(alpha_fade) = 684; \
275  MY(color_min) = colormin3; \
276  MY(color_max) = colormax3; \
277  MY(count) = 16; \
278  MY(gravity) = 0.500000; \
279  MY(liquidfriction) = 0.800000; \
280  MY(originjitter) = '16.0 16.0 16.0'; \
281  MY(size_min) = 1; \
282  MY(size_max) = 2; \
283  MY(tex_min) = 40; \
284  MY(tex_max) = 40; \
285  MY(type) = "spark"; \
286  MY(velocityjitter) = '424.0 424.0 624.0'; \
287  MY(velocityoffset) = '0.0 0.0 80.0'; \
288  } \
289  SUB(nade_##name##_explode) /* debris */ { \
290  MY(alpha_min) = 644; \
291  MY(alpha_max) = 956; \
292  MY(alpha_fade) = 2500; \
293  MY(color_min) = colormin3; \
294  MY(color_max) = colormax3; \
295  MY(count) = 8; \
296  MY(notunderwater) = true; \
297  MY(originjitter) = '64.0 64.0 64.0'; \
298  MY(startangle_min) = -180; \
299  MY(startangle_max) = 180; \
300  MY(spin_min) = -100; \
301  MY(spin_max) = 100; \
302  MY(size_min) = 20; \
303  MY(size_max) = 40; \
304  MY(tex_min) = 71; \
305  MY(tex_max) = 73; \
306  MY(type) = "smoke"; \
307  MY(velocityjitter) = '324.0 324.0 324.0'; \
308  } \
309 
310 
311 nade_explode(blue, '20.0 20.0 100.0', "0x80C0FF", "0x80C0FF", "0x629dff", "0x0018ff", "0x006cff", "0x0600ff")
312 nade_explode(red, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xff0000", "0xff4200", "0xff0000", "0xffa2a2")
313 nade_explode(yellow, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFFFF0F", "0xFFFF0F", "0xff0000", "0xffa2a2")
314 nade_explode(pink, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFF0FFF", "0xFF0FFF", "0xff0000", "0xffa2a2")
315 nade_explode(neutral, '100.0 20.0 20.0', "0xff0000", "0xffa2a2", "0xFFFFFF", "0xFFFFFF", "0xff0000", "0xffa2a2")
316 #undef nade_explode
#define nade_burn(name, colormin1, colormax1, colormin2, colormax2)
#define nade(name, colormin1, colormax1, colormin2, colormax2)
#define nade_explode(name, colorlight, colormin1, colormax1, colormin2, colormax2, colormin3, colormax3)