A_Thrust is an action that thrusts the actor horizontally at its current angle. Var1 determines the magnitude of the thrusting force, measured in fracunits/tic. Var2 determines the method of thrusting the actor this action uses:
|The actor's old momentum is retained, and the new thrust force is added on in the new direction; i.e. Thrust = Old momentum + Var1
A_Thrust is used repeatedly using this option, the actor will accelerate at a rate of Var1 fracunits/tic for each use of the action.
|The actor's old momentum is lost in favor of the new thrust force; i.e. Thrust = Var1
In SRB2, this action is used by the Bird Aircraft Strike Hazard and CastleBot FaceStabber.
Code – A_Thrust
// Function: A_Thrust
// Description: Pushes the object horizontally at its current angle.
// var1 = amount of force
// var2 = If 1, xy momentum is lost. If 0, xy momentum is kept
void A_Thrust(mobj_t *actor)
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction("A_Thrust", actor))
CONS_Debug(DBG_GAMELOGIC, "A_Thrust: Var1 not specified!\n");
P_InstaThrust(actor, actor->angle, FixedMul(locvar1*FRACUNIT, actor->scale));
P_Thrust(actor, actor->angle, FixedMul(locvar1*FRACUNIT, actor->scale));