mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-19 05:30:49 +00:00
- Rail spawned actor trails now set their targets to the shooter and transfer pitch.
This commit is contained in:
parent
5fcdb7b80d
commit
6bba84458c
3 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -97,7 +97,7 @@ struct SPortalHit
|
|||
DVector3 OutDir;
|
||||
};
|
||||
|
||||
void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &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<SPortalHit> &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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue