||This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.
A_BossZoom is an action that is a modification of
A_SkullAttack originally intended for use with the Egg Mobile, but was never used. The main difference from
A_SkullAttack is that instead of using a fixed flying speed, the actor's
Speed property determines the speed (
Speed*5*FRACUNIT). However, as Var1 and Var2 are not used, this action can only make the actor fly straight towards its target both vertically and horizontally.
Code – A_BossZoom
// Function: A_BossZoom
// Description: Like A_SkullAttack, but used by Boss 1.
// var1 = unused
// var2 = unused
void A_BossZoom(mobj_t *actor)
if (LUA_CallAction("A_BossZoom", actor))
dest = actor->target;
actor->flags2 |= MF2_SKULLFLY;
an = actor->angle >> ANGLETOFINESHIFT;
actor->momx = FixedMul(FixedMul(actor->info->speed*5*FRACUNIT, actor->scale), FINECOSINE(an));
actor->momy = FixedMul(FixedMul(actor->info->speed*5*FRACUNIT, actor->scale), FINESINE(an));
dist = P_AproxDistance(dest->x - actor->x, dest->y - actor->y);
dist = dist / FixedMul(actor->info->speed*5*FRACUNIT, actor->scale);
if (dist < 1)
dist = 1;
actor->momz = (dest->z + (dest->height>>1) - actor->z) / dist;