|
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_ArrowBonks is an action that makes the actor behave as though it had bounced off a wall. When this action is called the actor is given the MF_NOCLIPHEIGHT
object flag while MF_NOGRAVITY
is removed, this causes the actor to fall through the floor.
Code – A_ArrowBonks
|
|
// Function: A_ArrowBonks
//
// Description: Arrow momentum setting on collision
//
// var1 = unused
// var2 = unused
//
void A_ArrowBonks(mobj_t *actor)
{
if (LUA_CallAction(A_ARROWBONKS, actor))
return;
if (((actor->eflags & MFE_VERTICALFLIP) && actor->z + actor->height >= actor->ceilingz)
|| (!(actor->eflags & MFE_VERTICALFLIP) && actor->z <= actor->floorz))
actor->angle += ANGLE_180;
P_SetObjectMomZ(actor, 8*actor->scale, false);
P_InstaThrust(actor, actor->angle, -6*actor->scale);
actor->flags = (actor->flags|MF_NOCLIPHEIGHT) & ~MF_NOGRAVITY;
actor->z += P_MobjFlip(actor);
}
}
|
|