summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Haley2010-09-06 22:13:13 +0000
committerJames Haley2010-09-06 22:13:13 +0000
commit25e014bf2602d3f145da54a9329854aa615a3f75 (patch)
treef0d77d71dd00ba7f446b83264754ff1513c6d755 /src
parent2ff89acb8fac478f1bea14054e4e43882516e4f9 (diff)
downloadchocolate-doom-25e014bf2602d3f145da54a9329854aa615a3f75.tar.gz
chocolate-doom-25e014bf2602d3f145da54a9329854aa615a3f75.tar.bz2
chocolate-doom-25e014bf2602d3f145da54a9329854aa615a3f75.zip
Fixes to Inquisitor grenades, Loremaster hookshot spawn, and
P_SpawnFacingMissile. Subversion-branch: /branches/strife-branch Subversion-revision: 2024
Diffstat (limited to 'src')
-rw-r--r--src/strife/p_enemy.c2
-rw-r--r--src/strife/p_mobj.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c
index e62f6bd6..e7de0dbd 100644
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -2054,7 +2054,7 @@ void A_FireChainShot(mobj_t* actor)
{
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),
diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c
index a40e2e63..70907fb6 100644
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -1134,16 +1134,22 @@ mobj_t* P_SpawnFacingMissile(mobj_t* source, mobj_t* target, mobjtype_t type)
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 @@ mobj_t* P_SpawnMortar(mobj_t *source, mobjtype_t type)
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);