diff options
author | Samuel Villareal | 2010-09-06 21:51:41 +0000 |
---|---|---|
committer | Samuel Villareal | 2010-09-06 21:51:41 +0000 |
commit | 2ff89acb8fac478f1bea14054e4e43882516e4f9 (patch) | |
tree | 4730d573dc832b4598b264a2efdf399d560f1647 /src/strife | |
parent | 25314c9979b17efbeb18f88cae70dd65d884a6d6 (diff) | |
download | chocolate-doom-2ff89acb8fac478f1bea14054e4e43882516e4f9.tar.gz chocolate-doom-2ff89acb8fac478f1bea14054e4e43882516e4f9.tar.bz2 chocolate-doom-2ff89acb8fac478f1bea14054e4e43882516e4f9.zip |
+ P_ThrustMobj implemented
Subversion-branch: /branches/strife-branch
Subversion-revision: 2023
Diffstat (limited to 'src/strife')
-rw-r--r-- | src/strife/p_enemy.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) { |