A_MissileSplit is an action that, when applied to a missile Object, will split off a second missile at the actor's current position which flies on a new path. Var1 defines the Object type of the missile that is split off, and Var2 determines the angle at which it is split (for example, an value of 90 will split it off 90 degrees to the left). If the actor does not have the
MF_MISSILE flag, or does not have a target, this action does nothing.
This action originates from the v2.0 modification SRB2Morphed and was added to SRB2 itself in v2.1.
Code – A_MissileSplit
// Function: A_MissileSplit
// Description: If the object is a missile it will create a new missile with an alternate flight path owned by the one who shot the former missile.
// var1 = splitting missile type
// var2 = splitting angle
void A_MissileSplit(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction("A_MissileSplit", actor))
if (actor->eflags & MFE_VERTICALFLIP)
P_SpawnAlteredDirectionMissile(actor, locvar1, actor->x, actor->y, actor->z+actor->height, locvar2);
P_SpawnAlteredDirectionMissile(actor, locvar1, actor->x, actor->y, actor->z, locvar2);