foxygit / doom Log in
commit 8761422d31fdceb685b292a780727f3ad1d950db
Author:     Samuel Villareal <svkaiser@gmail.com>
AuthorDate: Fri Sep 3 05:37:55 2010 +0000
Commit:     Samuel Villareal <svkaiser@gmail.com>
CommitDate: Fri Sep 3 05:37:55 2010 +0000

    + Update to P_SpawnSubMissile, portions of the code was from a inlin'ed
      P_CheckMissileSpawn function

    Subversion-branch: /branches/strife-branch
    Subversion-revision: 2007
---
 src/strife/p_mobj.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c
index 8a0f7225..baa8fa05 100644
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -1008,9 +1008,10 @@ P_SpawnBlood
 //
 void P_CheckMissileSpawn (mobj_t* th)
 {
-    th->tics -= P_Random()&3;
+    // villsa [STRIFE] unused
+    /*th->tics -= P_Random()&3;
     if (th->tics < 1)
-	th->tics = 1;
+	th->tics = 1;*/

     // move a little forward so an angle can
     // be computed if it immediately explodes
@@ -1130,12 +1131,7 @@ mobj_t* P_SpawnSubMissile(mobj_t* source, mobj_t* target, mobjtype_t type, fixed
         dist = 1;

     th->momz = (target->z - source->z) / dist;
-    th->x += (th->momx >> 1);
-    th->y += (th->momy >> 1);
-    th->z += (th->momz >> 1);
-
-    if(!P_TryMove (th, th->x, th->y))
-        P_ExplodeMissile(th);
+    P_CheckMissileSpawn (th);
 }