A_FlameParticle is an action exclusive to SRB2Kart that spawns particles defined by the actor's painchance randomly around the actor's radius. The height the particles spawn is anywhere from the actor's height divided by two up to the actor's height. The spawned particles will move slowly upward. This action is used by the MZ Torch.
Code – A_FlameParticle
|
|
void A_FlameParticle(mobj_t *actor)
{
fixed_t rad = actor->radius>>FRACBITS, hei = actor->radius>>FRACBITS;
mobj_t *par;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FlameParticle", actor))
return;
#endif
par = P_SpawnMobj(
actor->x + (P_RandomRange(-rad, rad)<<FRACBITS),
actor->y + (P_RandomRange(-rad, rad)<<FRACBITS),
actor->z + (P_RandomRange(hei/2, hei)<<FRACBITS),
actor->info->painchance);
par->momz = actor->scale<<1;
}
|
|