'A_FZBoomFlash is an action exclusive to SRB2Kart. It flashes the screen white for any valid player within 1536 fracunits of the actor (including the actor) for 2 tics. 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_FZBoomFlash
|
|
// A_FZBoomFlash:
// Flash everyone close enough to the boom
void A_FZBoomFlash(mobj_t *actor)
{
UINT8 i;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FZBoomFlash", actor))
return;
#endif
for (i = 0; i < MAXPLAYERS; i++)
{
fixed_t dist;
if (!playeringame[i] || !players[i].mo)
continue;
dist = P_AproxDistance(P_AproxDistance(actor->x-players[i].mo->x, actor->y-players[i].mo->y), actor->z-players[i].mo->z);
if (dist < 1536<<FRACBITS)
P_FlashPal(&players[i], PAL_WHITE, 2);
}
return;
}
|
|