| 10369 | } |
| 10370 | |
| 10371 | void createParticleDropRising(Entity* parent, int sprite, double scale) |
| 10372 | { |
| 10373 | if ( !parent ) |
| 10374 | { |
| 10375 | return; |
| 10376 | } |
| 10377 | |
| 10378 | for ( int c = 0; c < 50; c++ ) |
| 10379 | { |
| 10380 | // shoot drops to the sky |
| 10381 | Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. |
| 10382 | entity->sizex = 1; |
| 10383 | entity->sizey = 1; |
| 10384 | entity->x = parent->x - 4 + local_rng.rand() % 9; |
| 10385 | entity->y = parent->y - 4 + local_rng.rand() % 9; |
| 10386 | entity->z = 7.5 + local_rng.rand() % 50; |
| 10387 | entity->vel_z = -1; |
| 10388 | //entity->yaw = (local_rng.rand() % 360) * PI / 180.0; |
| 10389 | entity->particleDuration = 10 + local_rng.rand() % 50; |
| 10390 | entity->scalex *= scale; |
| 10391 | entity->scaley *= scale; |
| 10392 | entity->scalez *= scale; |
| 10393 | entity->behavior = &actParticleDot; |
| 10394 | entity->flags[PASSABLE] = true; |
| 10395 | entity->flags[NOUPDATE] = true; |
| 10396 | entity->flags[UNCLICKABLE] = true; |
| 10397 | entity->lightBonus = vec4(*cvar_magic_fx_light_bonus, *cvar_magic_fx_light_bonus, |
| 10398 | *cvar_magic_fx_light_bonus, 0.f); |
| 10399 | if ( multiplayer != CLIENT ) |
| 10400 | { |
| 10401 | entity_uids--; |
| 10402 | } |
| 10403 | entity->setUID(-3); |
| 10404 | } |
| 10405 | } |
| 10406 | |
| 10407 | Entity* createParticleTimer(Entity* parent, int duration, int sprite) |
| 10408 | { |
no test coverage detected