A_FZBoomSmoke is an action exclusive to SRB2Kart. It spawns 8 pinkish F-Zero Smoke around the actor up to 47 fracunits away from it by default. The actor's Var1 determines how much to expand the default distance using 23*Var1. Var1 also determines how many extra smoke particles to spawn using 4*Var1. This action is used by players that explode if they are unable to finish a race in time or are in last place at the end of a race.
Code – A_FZBoomSmoke
|
|
// A_FZBoomSmoke:
// Spawns pinkish smoke around the object
// Var1 is radius add
void A_FZBoomSmoke(mobj_t *actor)
{
INT32 i;
INT32 rad = 47+(23*var1);
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FZBoomSmoke", actor))
return;
#endif
for (i = 0; i < 8+(4*var1); i++)
{
mobj_t *smoke = P_SpawnMobj(actor->x + (P_RandomRange(-rad, rad)*actor->scale), actor->y + (P_RandomRange(-rad, rad)*actor->scale),
actor->z + (P_RandomRange(0, 72)*actor->scale), MT_THOK);
P_SetMobjState(smoke, S_FZEROSMOKE1);
smoke->tics += P_RandomRange(-3, 4);
smoke->scale = actor->scale*3;
}
return;
}
|
|