Added FPF_NOAUTOAIM to A_FireCustomMissile

This commit is contained in:
Xaser Acheron 2015-09-08 10:40:21 -05:00
commit 8948f5dc2b
5 changed files with 7 additions and 5 deletions

View file

@ -5923,7 +5923,7 @@ AActor *P_SpawnPlayerMissile (AActor *source, const PClass *type, angle_t angle)
AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
const PClass *type, angle_t angle, AActor **pLineTarget, AActor **pMissileActor,
bool nofreeaim)
bool nofreeaim, bool noautoaim)
{
static const int angdiff[3] = { -1<<26, 1<<26, 0 };
angle_t an = angle;
@ -5936,7 +5936,7 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
{
return NULL;
}
if (source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM))
if (source->player && source->player->ReadyWeapon && ((source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM) || noautoaim))
{
// Keep exactly the same angle and pitch as the player's own aim
an = angle;