- Rail spawned actor trails now set their targets to the shooter and transfer pitch.

This commit is contained in:
MajorCooke 2016-04-23 08:19:59 -05:00
commit 6bba84458c
3 changed files with 7 additions and 3 deletions

View file

@ -632,7 +632,7 @@ struct TrailSegment
void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1, int color2, double maxdiff, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset)
void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1, int color2, double maxdiff, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset, DAngle pitch)
{
double length = 0;
int steps, i;
@ -889,7 +889,11 @@ void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1,
}
AActor *thing = Spawn (spawnclass, pos + diff, ALLOW_REPLACE);
if (thing)
{
if (source) thing->target = source;
thing->Angles.Pitch = pitch;
thing->Angles.Yaw = angle;
}
pos += trail[segment].dir * stepsize;
lencount -= stepsize;
if (lencount <= 0)