- Changes to both A_MonsterRail() and A_CustomRailgun(): Save actor's pitch,
use a larger aiming range, and ignore non-targets in P_AimLineAttack(). - Added another parameter to P_AimLineAttack(): A target to be aimed at. If this is non-NULL, then all actors between the shooter and the target will be ignored. SVN r1941 (trunk)
This commit is contained in:
parent
750659a82e
commit
efaa26959e
5 changed files with 36 additions and 25 deletions
|
|
@ -2703,6 +2703,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
|
|||
if (!self->target)
|
||||
return;
|
||||
|
||||
fixed_t saved_pitch = self->pitch;
|
||||
|
||||
// [RH] Andy Baker's stealth monsters
|
||||
if (self->flags & MF_STEALTH)
|
||||
{
|
||||
|
|
@ -2716,7 +2718,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
|
|||
self->target->x,
|
||||
self->target->y);
|
||||
|
||||
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE);
|
||||
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE, NULL, ANGLE_1*60, false, false, false, self->target);
|
||||
|
||||
// Let the aim trail behind the player
|
||||
self->angle = R_PointToAngle2 (self->x,
|
||||
|
|
@ -2730,6 +2732,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
|
|||
}
|
||||
|
||||
P_RailAttack (self, self->GetMissileDamage (0, 1), 0);
|
||||
self->pitch = saved_pitch;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_Scream)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue