shithub: choc

Download patch

ref: 25e014bf2602d3f145da54a9329854aa615a3f75
parent: 2ff89acb8fac478f1bea14054e4e43882516e4f9
author: James Haley <haleyjd@hotmail.com>
date: Mon Sep 6 18:13:13 EDT 2010

Fixes to Inquisitor grenades, Loremaster hookshot spawn, and
P_SpawnFacingMissile.

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

--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -2054,7 +2054,7 @@
 {
     S_StartSound(actor, sfx_tend);
 
-    P_SpawnMobj(actor->x, actor->y, actor->z, actor->z);
+    P_SpawnMobj(actor->x, actor->y, actor->z, MT_CHAINSHOT); // haleyjd: fixed type
 
     P_SpawnMobj(actor->x - (actor->momx >> 1),
         actor->y - (actor->momy >> 1),
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -1134,16 +1134,22 @@
         S_StartSound(th, th->info->seesound);
 
     th->target = source;    // where it came from
+    th->angle = source->angle; // haleyjd 09/06/10: fix0red
     an = th->angle;
 
     // fuzzy player
     if (target->flags & MF_SHADOW)
-	an += (P_Random()-P_Random())<<21;	
+    {
+        int t = P_Random();
+        an += (t - P_Random()) << 21;
+    }
     // villsa [STRIFE] check for heavily transparent things
     else if(target->flags & MF_MVIS)
-        an += (P_Random()-P_Random())<<22;
+    {
+        int t = P_Random();
+        an += (t - P_Random()) << 22;
+    }
 
-    th->angle = an;
     an >>= ANGLETOFINESHIFT;
     th->momx = FixedMul (th->info->speed, finecosine[an]);
     th->momy = FixedMul (th->info->speed, finesine[an]);
@@ -1250,8 +1256,8 @@
 
     slope = P_AimLineAttack(source, source->angle, 1024*FRACUNIT);
 
-    th->momx = FixedMul (th->info->speed, finecosine[an]);
-    th->momy = FixedMul (th->info->speed, finesine[an]);
+    th->momx = FixedMul(th->info->speed, finecosine[an]);
+    th->momy = FixedMul(th->info->speed, finesine[an]);
     th->momz = FixedMul(th->info->speed, slope);
 
     P_CheckMissileSpawn(th);