From 2ff89acb8fac478f1bea14054e4e43882516e4f9 Mon Sep 17 00:00:00 2001 From: Samuel Villareal Date: Mon, 6 Sep 2010 21:51:41 +0000 Subject: + P_ThrustMobj implemented Subversion-branch: /branches/strife-branch Subversion-revision: 2023 --- src/strife/p_enemy.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/strife/p_enemy.c') diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c index 2d47d6af..e62f6bd6 100644 --- a/src/strife/p_enemy.c +++ b/src/strife/p_enemy.c @@ -2336,6 +2336,20 @@ void A_SpawnEntity(mobj_t* actor) } +// +// P_ThrustMobj +// villsa [STRIFE] new function +// Thrusts an thing in a specified force/direction +// Beware! This is inlined everywhere in the asm +// + +void P_ThrustMobj(mobj_t *actor, angle_t angle, fixed_t force) +{ + angle_t an = angle >> ANGLETOFINESHIFT; + actor->momx += FixedMul(finecosine[an], force); + actor->momy += FixedMul(finesine[an], force); +} + void A_EntityDeath(mobj_t* actor) { -- cgit v1.2.3