restore old fadestep behavior if SPF_NEGATIVE_FADESTEP is not passed in

This commit is contained in:
Ricardo Luís Vaz Silva 2024-04-28 11:20:31 -03:00 committed by Rachael Alexanderson
parent 27eb78f437
commit c03f7889bf
3 changed files with 3 additions and 1 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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
};