- 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)
This commit is contained in:
Randy Heit 2013-03-13 02:56:54 +00:00
parent c7aa7e2a4b
commit e240d24abe
1 changed files with 9 additions and 7 deletions

View File

@ -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)) 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 // 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 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; break;
} }
} while (linetarget == NULL && --i >= 0); } while (linetarget == NULL && --i >= 0);
}
if (linetarget == NULL) if (linetarget == NULL)
{
an = angle;
if (nofreeaim || !level.IsFreelookAllowed())
{ {
pitch = 0; an = angle;
if (nofreeaim || !level.IsFreelookAllowed())
{
pitch = 0;
}
} }
} }
if (pLineTarget) *pLineTarget = linetarget; if (pLineTarget) *pLineTarget = linetarget;