29 float light,
float lightvel,
30 float lcol0,
float lcol1,
float lcol2);
69 float angle0,
float angle1,
float angle2,
70 float org0,
float org1,
float org2,
71 float vel0,
float vel1,
float vel2,
72 float accel0,
float accel1,
float accel2,
73 float color0,
float color1,
float color2,
74 float colorvel0,
float colorvel1,
float colorvel2,
75 float alpha,
float alphavel,
76 float size,
float sizevel,
133 p->thinknext=thinknext;
135 for (
j=0;
j<P_LIGHTS_MAX;
j++)
137 cplight_t *plight = &p->lights[
j];
138 plight->isactive =
false;
140 plight->lightvel = 0;
141 plight->lightcol[0] = 0;
142 plight->lightcol[1] = 0;
143 plight->lightcol[2] = 0;
205 for (k=0 ; k<
j ; k++)
262 memset (dl, 0,
sizeof(*dl));
275 memset (dl, 0,
sizeof(*dl));
282 memset (dl, 0,
sizeof(*dl));
364 dl->
radius = 100 + (rand()&31);
366 dl->
radius = 200 + (rand()&31);
391 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
404 dl->
radius = 200 + (rand()&31);
406 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
410 dl->
radius = 225 + (rand()&31);
413 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
415 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
419 dl->
radius = 250 + (rand()&31);
422 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
424 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
426 Com_sprintf(soundname,
sizeof(soundname),
"weapons/machgf%ib.wav", (rand() % 5) + 1);
552 dl->
radius = 200 + (rand()&31);
556 switch (flash_number)
710 Com_sprintf(soundname,
sizeof(soundname),
"tank/tnkatk2%c.wav",
'a' + rand() % 5);
893 dl->
radius = 300 + (rand()&100);
1028 p->
color[0] = color + (rand()&7);
1029 p->
color[1] = color + (rand()&7);
1030 p->
color[2] = color + (rand()&7);
1032 p->
color = color + (rand()&7);
1035 for (
j=0 ;
j<3 ;
j++)
1037 p->
org[
j] = org[
j] + ((rand()&7)-4) + d*dir[
j];
1072 p->
color[0] = color;
1073 p->
color[1] = color;
1074 p->
color[2] = color;
1080 for (
j=0 ;
j<3 ;
j++)
1082 p->
org[
j] = org[
j] + ((rand()&7)-4) + d*dir[
j];
1118 p->
color[0] = color;
1119 p->
color[1] = color;
1120 p->
color[2] = color;
1126 for (
j=0 ;
j<3 ;
j++)
1128 p->
org[
j] = org[
j] + ((rand()&7)-4) + d*dir[
j];
1150 for (
i=0 ;
i<8 ;
i++)
1168 for (
j=0 ;
j<2 ;
j++)
1174 p->
org[2] = ent->
origin[2] - 8 + (rand()&7);
1175 p->
vel[2] = 80 + (rand()&7);
1197 for (
i=0 ;
i<500 ;
i++)
1210 p->
color = 0xd0 + (rand()&7);
1212 p->
color = 0x40 + (rand()&7);
1214 p->
color = 0xe0 + (rand()&7);
1217 p->
org[0] = org[0] - 16 +
frand()*32;
1218 p->
org[1] = org[1] - 16 +
frand()*32;
1219 p->
org[2] = org[2] - 24 +
frand()*56;
1221 for (
j=0 ;
j<3 ;
j++)
1244 for (
i=0 ;
i<64 ;
i++)
1255 p->
color = 0xd4 + (rand()&3);
1261 for (
j=0 ;
j<3 ;
j++)
1283 for (
i=0 ;
i<256 ;
i++)
1293 p->
color = 0xe0 + (rand()&7);
1294 for (
j=0 ;
j<3 ;
j++)
1296 p->
org[
j] = org[
j] + ((rand()%32)-16);
1297 p->
vel[
j] = (rand()%384)-192;
1318 static int colortable[4] = {2*8,13*8,21*8,18*8};
1320 for (
i=0 ;
i<4096 ;
i++)
1331 p->
color = colortable[rand()&3];
1333 angle =
M_PI*2*(rand()&1023)/1023.0;
1335 p->
org[0] = org[0] + cos(angle)*dist;
1336 p->
vel[0] = cos(angle)*(70+(rand()&63));
1337 p->
accel[0] = -cos(angle)*100;
1339 p->
org[1] = org[1] + sin(angle)*dist;
1340 p->
vel[1] = sin(angle)*(70+(rand()&63));
1341 p->
accel[1] = -sin(angle)*100;
1343 p->
org[2] = org[2] + 8 + (rand()%90);
1344 p->
vel[2] = -100 + (rand()&31);
1379 p->
color = 0xe0 + (rand()&7);
1382 for (
j=0 ;
j<3 ;
j++)
1384 p->
org[
j] = org[
j] + ((rand()&7)-4) + d*dir[
j];
1439 for (
j=0 ;
j<3 ;
j++)
1491 for (
j=0 ;
j<3 ;
j++)
1547 for (
j=0 ;
j<3 ;
j++)
1621 p->
color = 0xe8 + (rand()&7);
1623 for (
j=0 ;
j<3 ;
j++)
1636 p->
color = 0xdb + (rand()&7);
1638 for (
j=0;
j< 3;
j++)
1651 p->
color = 4 + (rand()&7);
1653 for (
j=0 ;
j<3 ;
j++)
1718 if ( (rand()&7) == 0)
1731 p->
color = 0xdc + (rand()&3);
1733 for (
j=0 ;
j<3 ;
j++)
1770 for (
i=0 ;
i<len ;
i++)
1793 p->
color = clr + (rand()&7);
1795 for (
j=0 ;
j<3 ;
j++)
1797 p->
org[
j] = move[
j] + dir[
j]*3;
1798 p->
vel[
j] = dir[
j]*6;
1825 p->
color = 0x0 + (rand()&15);
1827 for (
j=0 ;
j<3 ;
j++)
1877 p->
color = 0xe4 + (rand()&3);
1881 p->
org[
j] = move[
j];
1925 for (
i=0 ;
i<len ;
i+=dec)
1941 p->
color = 4 + (rand()&7);
1943 for (
j=0 ;
j<3 ;
j++)
1961 #define BEAMLENGTH 16
1967 float sr, sp, sy, cr, cp, cy;
1983 ltime = (float)
cl.
time / 1000.0;
2009 dist = sin(ltime +
i)*64;
2044 count = n * 162 / 20000.0;
2049 count = n * 162 / 20000.0;
2064 #define BEAMLENGTH 16
2070 float sr, sp, sy, cr, cp, cy;
2083 ltime = (float)
cl.
time / 1000.0;
2109 dist = sin(ltime +
i)*64;
2120 p->
color = floor (0xd0 + dist * 7);
2123 p->
alpha = 1.0 - dist;
2177 for (
j=0 ;
j<3 ;
j++)
2202 for (
i=-2 ;
i<=2 ;
i+=4)
2203 for (
j=-2 ;
j<=2 ;
j+=4)
2204 for (k=-2 ; k<=4 ; k+=4)
2215 p->
color = 0xe0 + (rand()&3);
2218 p->
alphavel = -1.0 / (0.3 + (rand()&7) * 0.02);
2220 p->
org[0] = org[0] +
i + ((rand()&23) *
crand());
2221 p->
org[1] = org[1] +
j + ((rand()&23) *
crand());
2222 p->
org[2] = org[2] + k + ((rand()&23) *
crand());
2229 vel = 50 + (rand()&63);
2250 for (
i=0 ;
i<256 ;
i++)
2261 p->
color = 0xd0 + (rand()&7);
2263 for (
j=0 ;
j<3 ;
j++)
2265 p->
org[
j] = org[
j] + ((rand()%32)-16);
2266 p->
vel[
j] = (rand()%384)-192;
2291 for (
i=-16 ;
i<=16 ;
i+=4)
2292 for (
j=-16 ;
j<=16 ;
j+=4)
2293 for (k=-16 ; k<=32 ; k+=4)
2304 p->
color = 7 + (rand()&7);
2307 p->
alphavel = -1.0 / (0.3 + (rand()&7) * 0.02);
2309 p->
org[0] = org[0] +
i + (rand()&3);
2310 p->
org[1] = org[1] +
j + (rand()&3);
2311 p->
org[2] = org[2] + k + (rand()&3);
2318 vel = 50 + (rand()&63);
2382 org[0] = p->
org[0] + p->
vel[0]*time + p->
accel[0]*time2;
2383 org[1] = p->
org[1] + p->
vel[1]*time + p->
accel[1]*time2;
2384 org[2] = p->
org[2] + p->
vel[2]*time + p->
accel[2]*time2;
2460 0,0,0,15,15,15,31,31,31,47,47,47,63,63,63,75,75,75,91,91,91,107,107,107,123,123,123,139,139,139,155,155,155,171,171,171,187,187,187,203,203,203,219,219,219,235,235,235,99,75,35,91,67,31,83,63,31,79,59,27,71,55,27,63,47,
2461 23,59,43,23,51,39,19,47,35,19,43,31,19,39,27,15,35,23,15,27,19,11,23,15,11,19,15,7,15,11,7,95,95,111,91,91,103,91,83,95,87,79,91,83,75,83,79,71,75,71,63,67,63,59,59,59,55,55,51,47,47,47,43,43,39,
2462 39,39,35,35,35,27,27,27,23,23,23,19,19,19,143,119,83,123,99,67,115,91,59,103,79,47,207,151,75,167,123,59,139,103,47,111,83,39,235,159,39,203,139,35,175,119,31,147,99,27,119,79,23,91,59,15,63,39,11,35,23,7,167,59,43,
2463 159,47,35,151,43,27,139,39,19,127,31,15,115,23,11,103,23,7,87,19,0,75,15,0,67,15,0,59,15,0,51,11,0,43,11,0,35,11,0,27,7,0,19,7,0,123,95,75,115,87,67,107,83,63,103,79,59,95,71,55,87,67,51,83,63,
2464 47,75,55,43,67,51,39,63,47,35,55,39,27,47,35,23,39,27,19,31,23,15,23,15,11,15,11,7,111,59,23,95,55,23,83,47,23,67,43,23,55,35,19,39,27,15,27,19,11,15,11,7,179,91,79,191,123,111,203,155,147,215,187,183,203,
2465 215,223,179,199,211,159,183,195,135,167,183,115,151,167,91,135,155,71,119,139,47,103,127,23,83,111,19,75,103,15,67,91,11,63,83,7,55,75,7,47,63,7,39,51,0,31,43,0,23,31,0,15,19,0,7,11,0,0,0,139,87,87,131,79,79,
2466 123,71,71,115,67,67,107,59,59,99,51,51,91,47,47,87,43,43,75,35,35,63,31,31,51,27,27,43,19,19,31,15,15,19,11,11,11,7,7,0,0,0,151,159,123,143,151,115,135,139,107,127,131,99,119,123,95,115,115,87,107,107,79,99,99,
2467 71,91,91,67,79,79,59,67,67,51,55,55,43,47,47,35,35,35,27,23,23,19,15,15,11,159,75,63,147,67,55,139,59,47,127,55,39,119,47,35,107,43,27,99,35,23,87,31,19,79,27,15,67,23,11,55,19,11,43,15,7,31,11,7,23,
2468 7,0,11,0,0,0,0,0,119,123,207,111,115,195,103,107,183,99,99,167,91,91,155,83,87,143,75,79,127,71,71,115,63,63,103,55,55,87,47,47,75,39,39,63,35,31,47,27,23,35,19,15,23,11,7,7,155,171,123,143,159,111,135,151,99,
2469 123,139,87,115,131,75,103,119,67,95,111,59,87,103,51,75,91,39,63,79,27,55,67,19,47,59,11,35,47,7,27,35,0,19,23,0,11,15,0,0,255,0,35,231,15,63,211,27,83,187,39,95,167,47,95,143,51,95,123,51,255,255,255,255,255,
2470 211,255,255,167,255,255,127,255,255,83,255,255,39,255,235,31,255,215,23,255,191,15,255,171,7,255,147,0,239,127,0,227,107,0,211,87,0,199,71,0,183,59,0,171,43,0,155,31,0,143,23,0,127,15,0,115,7,0,95,0,0,71,0,0,47,
2471 0,0,27,0,0,239,0,0,55,55,255,255,0,0,0,0,255,43,43,35,27,27,23,19,19,15,235,151,127,195,115,83,159,87,51,123,63,27,235,211,199,199,171,155,167,139,119,135,107,87,159,91,83
2531 else if (*
alpha>.25)
2543 p->thinknext =
true;
2546 #define EXPLODESTAININTESITY 75
2567 org[0], org[1], org[2],
2572 1, (0.5+
random()*0.5) * (rocket)? -2 : -1.5,
2573 (size!=0)?size:(150-(!rocket)?75:0), 0,
2575 PART_DEPTHHACK_SHORT,
2580 float lightsize = (large)? 1.0 : 0.75;
2614 float light,
float lightvel,
2615 float lcol0,
float lcol1,
float lcol2)
2619 for (
i=0;
i<P_LIGHTS_MAX;
i++)
2621 cplight_t *plight = &p->lights[
i];
2622 if (!plight->isactive)
2624 plight->isactive =
true;
2625 plight->light = light;
2626 plight->lightvel = lightvel;
2627 plight->lightcol[0] = lcol0;
2628 plight->lightcol[1] = lcol1;
2629 plight->lightcol[2] = lcol2;
2642 #define pBlasterMaxSize 5
2653 p->thinknext =
true;
2666 org[0], org[1], org[2],
2667 org[0]+((rand()&5)-2)+d*dir[0], org[1]+((rand()&5)-2)+d*dir[1], org[2]+((rand()&5)-2)+d*dir[2],
2668 (dir[0]*75 +
crand()*20)*speed, (dir[1]*75 +
crand()*20)*speed, (dir[2]*75 +
crand()*20)*speed,
2672 1, -1.0 / (0.5 +
frand()*0.3),