A_KnockBack is an action that is used to knock back the actor's target or tracer at its current horizontal speed – i.e., the target Object's horizontal momentum is completely reversed. Var1 determines whether the actor's target (0) or the actor's tracer (1) will be knocked back by this action. If the chosen Object does not exist, this action will do nothing.
This action originates from the v2.0 modification SRB2Morphed and was added to SRB2 itself in v2.1.
Code – A_KnockBack
// Function: A_KnockBack
// Description: Knocks back the object's target at its current speed.
// 0 = target
// 1 = tracer
// var2 = unused
void A_KnockBack(mobj_t *actor)
INT32 locvar1 = var1;
if (LUA_CallAction("A_KnockBack", actor))
target = actor->target;
target = actor->tracer;
CONS_Printf("A_KnockBack: No target!\n");
target->momx *= -1;
target->momy *= -1;