mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- 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:
parent
4228386837
commit
dfe470e5f2
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue