Skip to content

Commit

Permalink
restore old fadestep behavior if SPF_NEGATIVE_FADESTEP is not passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and madame-rachelle committed Apr 29, 2024
1 parent 27eb78f commit c03f788
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/playsim/p_effect.cpp
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/playsim/p_effect.h
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/zscript/constants.zs
Expand Up @@ -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
};
Expand Down

0 comments on commit c03f788

Please sign in to comment.