- Added JLOSF_NOAUTOAIM flag for when you want to use A_JumpIfTargetInLOS in conjunction with

something that never autoaims, such as a railgun.
- Fixed: A_JumpIfTargetInLOS should use P_AimLineAttack() instead of P_BulletSlope(), because the
  latter intentionally checks to the sides of the aimed line.

SVN r4007 (trunk)
This commit is contained in:
Randy Heit 2013-01-02 03:17:52 +00:00
parent 4228386837
commit dfe470e5f2
2 changed files with 4 additions and 2 deletions

View file

@ -2866,7 +2866,8 @@ enum JLOS_flags
JLOSF_TARGETLOS=128,
JLOSF_FLIPFOV=256,
JLOSF_ALLYNOJUMP=512,
JLOSF_COMBATANTONLY=1024
JLOSF_COMBATANTONLY=1024,
JLOSF_NOAUTOAIM=2048,
};
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS)
@ -2912,7 +2913,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS)
else
{
// Does the player aim at something that can be shot?
P_BulletSlope(self, &target);
P_AimLineAttack(self, self->angle, MISSILERANGE, &target, (flags & JLOSF_NOAUTOAIM) ? ANGLE_1/2 : 0);
if (!target) return;

View file

@ -84,6 +84,7 @@ const int JLOSF_TARGETLOS = 128;
const int JLOSF_FLIPFOV = 256;
const int JLOSF_ALLYNOJUMP = 512;
const int JLOSF_COMBATANTONLY = 1024;
const int JLOSF_NOAUTOAIM = 2048;
// Flags for A_ChangeVelocity
const int CVF_RELATIVE = 1;