From e240d24abebc21701d7b098ce3700370af63e4de Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 13 Mar 2013 02:56:54 +0000 Subject: [PATCH] - Fixed: P_SpawnPlayerMissile() should not 0 the pitch for weapons that don't autoaim. This allows A_FireOldBFG to work properly when freelook is disabled. SVN r4178 (trunk) --- src/p_mobj.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 075d130c33..f07ab0ff1e 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5628,7 +5628,9 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, if (source && source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM)) { // Keep exactly the same angle and pitch as the player's own aim - pitch = source->pitch; linetarget = NULL; + an = angle; + pitch = source->pitch; + linetarget = NULL; } else // see which target is to be aimed at { @@ -5646,14 +5648,14 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, break; } } while (linetarget == NULL && --i >= 0); - } - if (linetarget == NULL) - { - an = angle; - if (nofreeaim || !level.IsFreelookAllowed()) + if (linetarget == NULL) { - pitch = 0; + an = angle; + if (nofreeaim || !level.IsFreelookAllowed()) + { + pitch = 0; + } } } if (pLineTarget) *pLineTarget = linetarget;