From 37f4ee53b9973b787d4650edd2c376eff0f68e32 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 13 Apr 2012 08:15:57 +0000 Subject: [PATCH] - applied Xaser's A_RailAttack duration fix. SVN r3557 (trunk) --- src/p_effect.cpp | 8 ++++++-- src/thingdef/thingdef_codeptr.cpp | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 60f795a3a..9a0986fb1 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -685,9 +685,11 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end if (!p) return; + int spiralduration = (duration == 0) ? 35 : duration; + p->trans = 255; p->ttl = duration; - p->fade = FADEFROMTTL(duration); + p->fade = FADEFROMTTL(spiralduration); p->size = 3; p->bright = fullbright; @@ -734,7 +736,9 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end pos = start; for (i = trail_steps; i; i--) { - particle_t *p = JitterParticle (33); + // [XA] inner trail uses a different default duration (33). + int innerduration = (duration == 0) ? 33 : duration; + particle_t *p = JitterParticle (innerduration, drift); if (!p) return; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 5b070c003..09c1afe9c 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1401,7 +1401,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack) ACTION_PARAM_CLASS(SpawnClass, 14); if(Range==0) Range=8192*FRACUNIT; - if(Duration==0) Duration=35; if(Sparsity==0) Sparsity=1.0; if (!self->player) return; @@ -1464,7 +1463,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun) ACTION_PARAM_CLASS(SpawnClass, 14); if(Range==0) Range=8192*FRACUNIT; - if(Duration==0) Duration=35; if(Sparsity==0) Sparsity=1.0; AActor *linetarget;