| 10105 | } |
| 10106 | |
| 10107 | void createParticleErupt(real_t x, real_t y, int sprite) |
| 10108 | { |
| 10109 | real_t yaw = 0; |
| 10110 | int numParticles = 8; |
| 10111 | for ( int c = 0; c < 8; c++ ) |
| 10112 | { |
| 10113 | Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. |
| 10114 | entity->sizex = 1; |
| 10115 | entity->sizey = 1; |
| 10116 | entity->x = x; |
| 10117 | entity->y = y; |
| 10118 | entity->z = 7.5; // start from the ground. |
| 10119 | entity->yaw = yaw; |
| 10120 | entity->vel_x = 0.2; |
| 10121 | entity->vel_y = 0.2; |
| 10122 | entity->vel_z = -2; |
| 10123 | entity->skill[0] = 100; |
| 10124 | entity->skill[1] = 0; // direction. |
| 10125 | entity->fskill[0] = 0.1; |
| 10126 | entity->behavior = &actParticleErupt; |
| 10127 | entity->flags[PASSABLE] = true; |
| 10128 | entity->flags[NOUPDATE] = true; |
| 10129 | entity->flags[UNCLICKABLE] = true; |
| 10130 | entity->lightBonus = vec4(*cvar_magic_fx_light_bonus, *cvar_magic_fx_light_bonus, |
| 10131 | *cvar_magic_fx_light_bonus, 0.f); |
| 10132 | if ( multiplayer != CLIENT ) |
| 10133 | { |
| 10134 | entity_uids--; |
| 10135 | } |
| 10136 | entity->setUID(-3); |
| 10137 | yaw += 2 * PI / numParticles; |
| 10138 | } |
| 10139 | } |
| 10140 | |
| 10141 | void createParticleErupt(Entity* parent, int sprite) |
| 10142 | { |
no test coverage detected