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:
parent
2e8aa53e6a
commit
ce13b5c6e1
3 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue