Enhanced FastProjectile trails.

- Trails now copy pitch, and set the projectile as the target.
- Added GETOWNER flag. Using it sets the owner of the fast projectile as the target instead, if it has an owner.
This commit is contained in:
Major Cooke 2016-09-04 08:53:20 -05:00 committed by Christoph Oelckers
commit ce13b5c6e1
3 changed files with 9 additions and 2 deletions

View file

@ -166,8 +166,14 @@ void AFastProjectile::Effect()
if (trail != NULL)
{
AActor *act = Spawn (trail, PosAtZ(hitz), ALLOW_REPLACE);
if (act != NULL)
if (act != nullptr)
{
if ((flags5 & MF5_GETOWNER) && (target != nullptr))
act->target = target;
else
act->target = this;
act->Angles.Pitch = Angles.Pitch;
act->Angles.Yaw = Angles.Yaw;
}
}