diff --git a/src/playsim/p_effect.cpp b/src/playsim/p_effect.cpp index 5ee7e9f3c..459d267be 100644 --- a/src/playsim/p_effect.cpp +++ b/src/playsim/p_effect.cpp @@ -374,7 +374,7 @@ void P_SpawnParticle(FLevelLocals *Level, const DVector3 &pos, const DVector3 &v particle->Acc = FVector3(accel); particle->color = ParticleColor(color); particle->alpha = float(startalpha); - if (fadestep <= -1.0) particle->fadestep = FADEFROMTTL(lifetime); + if ((fadestep < 0 && !(flags & SPF_NEGATIVE_FADESTEP)) || fadestep <= -1.0) particle->fadestep = FADEFROMTTL(lifetime); else particle->fadestep = float(fadestep); particle->ttl = lifetime; particle->size = size; diff --git a/src/playsim/p_effect.h b/src/playsim/p_effect.h index 0f439785c..374aeecfc 100644 --- a/src/playsim/p_effect.h +++ b/src/playsim/p_effect.h @@ -65,6 +65,7 @@ enum EParticleFlags SPF_REPLACE = 1 << 7, SPF_NO_XY_BILLBOARD = 1 << 8, SPF_LOCAL_ANIM = 1 << 9, + SPF_NEGATIVE_FADESTEP = 1 << 10, }; class DVisualThinker; diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index e1176c649..8e36a5516 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -714,6 +714,7 @@ enum EParticleFlags SPF_REPLACE = 1 << 7, SPF_NO_XY_BILLBOARD = 1 << 8, SPF_LOCAL_ANIM = 1 << 9, + SPF_NEGATIVE_FADESTEP = 1 << 10, SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG };