shithub: choc

Download patch

ref: 2ff89acb8fac478f1bea14054e4e43882516e4f9
parent: 25314c9979b17efbeb18f88cae70dd65d884a6d6
author: Samuel Villareal <[email protected]>
date: Mon Sep 6 17:51:41 EDT 2010

+ P_ThrustMobj implemented

Subversion-branch: /branches/strife-branch
Subversion-revision: 2023

--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -2336,6 +2336,20 @@
 
 }
 
+//
+// 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)
 {