SpawnParticle functions

- Added A_SpawnParticle Decorate and SpawnParticle ACS functions.
This commit is contained in:
Edward Richardson 2015-12-08 22:58:24 +13:00
commit c099cd4581
5 changed files with 92 additions and 1 deletions

View file

@ -284,6 +284,31 @@ void P_ThinkParticles ()
}
}
void P_SpawnParticle(fixed_t x, fixed_t y, fixed_t z, fixed_t velx, fixed_t vely, fixed_t velz, PalEntry color, bool fullbright, BYTE startalpha, BYTE lifetime, BYTE size, int fadestep, fixed_t accelx, fixed_t accely, fixed_t accelz)
{
particle_t *particle = NewParticle();
if (particle)
{
particle->x = x;
particle->y = y;
particle->z = z;
particle->velx = velx;
particle->vely = vely;
particle->velz = velz;
particle->color = ParticleColor(color);
particle->trans = startalpha;
if (fadestep < 0) fadestep = FADEFROMTTL(lifetime);
particle->fade = fadestep;
particle->ttl = lifetime;
particle->accx = accelx;
particle->accy = accely;
particle->accz = accelz;
particle->bright = fullbright;
particle->size = size;
}
}
//
// P_RunEffects
//