(float[] org, float[] dir, int color,
int count, int magnitude)
| 326 | * =============== |
| 327 | */ |
| 328 | static void ParticleSteamEffect(float[] org, float[] dir, int color, |
| 329 | int count, int magnitude) { |
| 330 | int i, j; |
| 331 | cparticle_t p; |
| 332 | float d; |
| 333 | |
| 334 | // vectoangles2 (dir, angle_dir); |
| 335 | // AngleVectors (angle_dir, f, r, u); |
| 336 | |
| 337 | Math3D.MakeNormalVectors(dir, r, u); |
| 338 | |
| 339 | for (i = 0; i < count; i++) { |
| 340 | if (CL_fx.free_particles == null) |
| 341 | return; |
| 342 | p = CL_fx.free_particles; |
| 343 | CL_fx.free_particles = p.next; |
| 344 | p.next = CL_fx.active_particles; |
| 345 | CL_fx.active_particles = p; |
| 346 | |
| 347 | p.time = ClientGlobals.cl.time; |
| 348 | p.color = color + (Lib.rand() & 7); |
| 349 | |
| 350 | for (j = 0; j < 3; j++) { |
| 351 | p.org[j] = org[j] + magnitude * 0.1f * Lib.crandom(); |
| 352 | // p.vel[j] = dir[j]*magnitude; |
| 353 | } |
| 354 | Math3D.VectorScale(dir, magnitude, p.vel); |
| 355 | d = Lib.crandom() * magnitude / 3; |
| 356 | Math3D.VectorMA(p.vel, d, r, p.vel); |
| 357 | d = Lib.crandom() * magnitude / 3; |
| 358 | Math3D.VectorMA(p.vel, d, u, p.vel); |
| 359 | |
| 360 | p.accel[0] = p.accel[1] = 0; |
| 361 | p.accel[2] = -CL_fx.PARTICLE_GRAVITY / 2; |
| 362 | p.alpha = 1.0f; |
| 363 | |
| 364 | p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * 0.3f); |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | // stack variable |
| 369 | // r, u, dir |
no test coverage detected