diff --git a/src/p_effect.cpp b/src/p_effect.cpp index efa42d11a..25838459d 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -632,7 +632,7 @@ struct TrailSegment -void P_DrawRailTrail(AActor *source, TArray &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 &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 &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) diff --git a/src/p_effect.h b/src/p_effect.h index 1e7750343..8ae272329 100644 --- a/src/p_effect.h +++ b/src/p_effect.h @@ -97,7 +97,7 @@ struct SPortalHit DVector3 OutDir; }; -void P_DrawRailTrail(AActor *source, TArray &portalhits, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270); +void P_DrawRailTrail(AActor *source, TArray &portalhits, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270, DAngle pitch = 0.); void P_DrawSplash (int count, const DVector3 &pos, DAngle angle, int kind); void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, int kind); void P_DisconnectEffect (AActor *actor); diff --git a/src/p_map.cpp b/src/p_map.cpp index 72746f2fb..3d04c6889 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4704,7 +4704,7 @@ void P_RailAttack(FRailParams *p) } // Draw the slug's trail. - P_DrawRailTrail(source, rail_data.PortalHits, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset); + P_DrawRailTrail(source, rail_data.PortalHits, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset, pitch); } //==========================================================================