Use textured particles.

This commit is contained in:
Mari the Deer 2022-11-06 17:06:54 +01:00
commit 843a79ac42
14 changed files with 58 additions and 31 deletions

View file

@ -124,6 +124,7 @@ Mixin Class SWWMOverlapPickupSound
Class SWWMRespawnTimer : SWWMNonInteractiveActor
{
TextureID flaretex;
default
{
Args 0,3,2;
@ -153,12 +154,13 @@ Class SWWMRespawnTimer : SWWMNonInteractiveActor
double str = 1.-special2/double(special1);
int freq = int(clamp(30*(1.-str),3,30));
if ( (level.maptime+args[3])%freq ) return;
if ( !flaretex ) flaretex = TexMan.CheckForTexture("graphics/Particles/xflare.png");
int numpt = int(Random[ExploS](0,10)*str);
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90);
A_SpawnParticle(Color(args[0]*85,args[1]*85,args[2]*85),SPF_FULLBRIGHT,Random[ExploS](30,60),FRandom[ExploS](1.,2.),0,0,0,16,FRandom[ExploS](-.8,.8),FRandom[ExploS](-.8,.8),FRandom[ExploS](-.8,.8),0,0,0,FRandom[ExploS](.45,.9)*str,-1,FRandom[ExploS](-.04,-.02)*str);
A_SpawnParticleEx(Color(args[0]*85,args[1]*85,args[2]*85),flaretex,STYLE_AddShaded,SPF_FULLBRIGHT,Random[ExploS](30,60),FRandom[ExploS](2.,3.),0,0,0,16,FRandom[ExploS](-.8,.8),FRandom[ExploS](-.8,.8),FRandom[ExploS](-.8,.8),0,0,0,FRandom[ExploS](.45,.9)*str,-1,FRandom[ExploS](-.04,-.02)*str);
}
}
}

View file

@ -3409,6 +3409,7 @@ Class DivineSpriteEffect : Inventory
bool bHealDone;
Actor l, snd;
DynamicValueInterpolator AlphInter;
TextureID flaretex;
Property HealTimer : healtim;
@ -3453,6 +3454,7 @@ Class DivineSpriteEffect : Inventory
AlphInter.Update(Owner.Health);
double alph = clamp((AlphInter.GetValue()-1000.)/6000.,0.,1.);
double scl = clamp((AlphInter.GetValue()-1000.)/6000.,2.,4.);
if ( !flaretex ) flaretex = TexMan.CheckForTexture("graphics/Particles/xflare.png");
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
@ -3460,7 +3462,7 @@ Class DivineSpriteEffect : Inventory
double dst = FRandom[ExploS](.25,.75)*Owner.height;
Vector3 dir = SWWMUtility.Vec3Fromangles(ang,pt);
Vector3 ppos = Owner.Vec3offset(0,0,Owner.height/2)+dir*dst;
A_SpawnParticle("White",SPF_FULLBRIGHT,30,scl,0,ppos.x,ppos.y,ppos.z,dir.x*.2,dir.y*.2,dir.z*.2,0,0,.05,alph,-1,-scl/30.);
A_SpawnParticleEx("White",flaretex,STYLE_AddShaded,SPF_FULLBRIGHT,30,scl,0,ppos.x,ppos.y,ppos.z,dir.x*.2,dir.y*.2,dir.z*.2,0,0,.05,alph,-1,-scl/30.);
}
if ( bHealDone || (Owner.Health <= 0) )
{