shithub: choc

Download patch

ref: 8761422d31fdceb685b292a780727f3ad1d950db
parent: 89bed5675b8dd5a5fa958c4c3f81e81a076ef550
author: Samuel Villareal <svkaiser@gmail.com>
date: Fri Sep 3 01:37:55 EDT 2010

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

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

--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -1008,9 +1008,10 @@
 //
 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 @@
         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);
 }