Skip to content

Commit c03f788

Browse files
RicardoLuis0madame-rachelle
authored andcommitted
restore old fadestep behavior if SPF_NEGATIVE_FADESTEP is not passed in
1 parent 27eb78f commit c03f788

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/playsim/p_effect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ void P_SpawnParticle(FLevelLocals *Level, const DVector3 &pos, const DVector3 &v
374374
particle->Acc = FVector3(accel);
375375
particle->color = ParticleColor(color);
376376
particle->alpha = float(startalpha);
377-
if (fadestep <= -1.0) particle->fadestep = FADEFROMTTL(lifetime);
377+
if ((fadestep < 0 && !(flags & SPF_NEGATIVE_FADESTEP)) || fadestep <= -1.0) particle->fadestep = FADEFROMTTL(lifetime);
378378
else particle->fadestep = float(fadestep);
379379
particle->ttl = lifetime;
380380
particle->size = size;

src/playsim/p_effect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ enum EParticleFlags
6565
SPF_REPLACE = 1 << 7,
6666
SPF_NO_XY_BILLBOARD = 1 << 8,
6767
SPF_LOCAL_ANIM = 1 << 9,
68+
SPF_NEGATIVE_FADESTEP = 1 << 10,
6869
};
6970

7071
class DVisualThinker;

wadsrc/static/zscript/constants.zs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ enum EParticleFlags
714714
SPF_REPLACE = 1 << 7,
715715
SPF_NO_XY_BILLBOARD = 1 << 8,
716716
SPF_LOCAL_ANIM = 1 << 9,
717+
SPF_NEGATIVE_FADESTEP = 1 << 10,
717718

718719
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
719720
};

0 commit comments

Comments
 (0)