diff options
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) { |