MCPcopy Create free account
hub / github.com/TurningWheel/Barony / createParticleErupt

Function createParticleErupt

src/magic/actmagic.cpp:10107–10139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10105}
10106
10107void 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
10141void createParticleErupt(Entity* parent, int sprite)
10142{

Callers 13

actChestMethod · 0.85
actDeathGhostLimbFunction · 0.85
shopkeeperMoveBodypartsFunction · 0.85
bombDoEffectFunction · 0.85
incubusDieFunction · 0.85
mimicAnimateFunction · 0.85
net.cppFile · 0.85
castSpellFunction · 0.85
actParticleTimerFunction · 0.85
actParticleSapCenterFunction · 0.85
spellEffectDemonIllusionFunction · 0.85
spellEffectHologramFunction · 0.85

Calls 3

newEntityFunction · 0.85
vec4Class · 0.85
setUIDMethod · 0.80

Tested by

no test coverage detected