Switch all particle spawns to level.SpawnParticle().

This commit is contained in:
Mari the Deer 2022-12-05 14:13:47 +01:00
commit 7be1793900
5 changed files with 285 additions and 47 deletions

View file

@ -124,7 +124,7 @@ Mixin Class SWWMOverlapPickupSound
Class SWWMRespawnTimer : SWWMNonInteractiveActor
{
TextureID flaretex;
FSpawnParticleParams flare;
default
{
Args 0,3,2;
@ -155,13 +155,26 @@ 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");
if ( !flare.texture )
{
flare.color1 = Color(args[0]*85,args[1]*85,args[2]*85);
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT;
flare.fadestep = -1;
}
flare.pos = pos+(0,0,16);
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_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);
flare.lifetime = Random[ExploS](30,60);
flare.size = FRandom[ExploS](2.,3.);
flare.vel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](0.,.8);
flare.startalpha = FRandom[ExploS](.45,.9)*str;
flare.sizestep = FRandom[ExploS](-.04,-.02)*str;
level.SpawnParticle(flare);
}
}
}

View file

@ -3408,7 +3408,7 @@ Class DivineSpriteEffect : Inventory
bool bHealDone;
Actor l, snd;
DynamicValueInterpolator AlphInter;
TextureID flaretex;
FSpawnParticleParams flare;
Property HealTimer : healtim;
@ -3453,15 +3453,28 @@ 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");
if ( !flare.texture )
{
flare.color1 = "White";
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT;
flare.lifetime = 30;
flare.fadestep = -1;
flare.accel = (0,0,.05);
}
flare.size = scl;
flare.sizestep = -scl/30.;
flare.startalpha = alph;
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90);
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_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.);
flare.pos = Owner.Vec3Offset(0,0,Owner.height/2)+dir*dst;
flare.vel = dir*.2;
level.SpawnParticle(flare);
}
if ( bHealDone || (Owner.Health <= 0) )
{
@ -3492,7 +3505,6 @@ Class DivineSpriteEffect : Inventory
else if ( !(healcnt%5) )
{
Owner.GiveBody(500,10000);
SWWMHandler.DoFlash(Owner,Color(10,255,255,255),10);
Owner.A_StartSound("powerup/divinehit",CHAN_ITEMEXTRA,CHANF_OVERLAP);
}
}

View file

@ -25,11 +25,25 @@ Class mkBlood : SWWMNonInteractiveActor
Vector3 vdir = SWWMUtility.Vec3FromAngles(b.angle,b.pitch);
TextureID pufftex[8];
for ( int i=0; i<8; i++ ) pufftex[i] = TexMan.CheckForTexture("graphics/Particles/xpuff"..i..".png");
FSpawnParticleParams puff;
puff.color1 = b.fillcolor;
puff.style = STYLE_Shaded;
puff.accel = (0,0,-.25);
puff.startalpha = .75;
puff.fadestep = -1;
puff.pos = pos;
for ( int i=0; i<numpt; i++ )
{
Vector3 ndir = (vdir+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.5).unit()*FRandom[Blood](.2,2.)*sstr;
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticleEx(b.fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,int(12*sstr),2.*str*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.75,-1,-.02*sstr*j);
{
puff.texture = pufftex[Random[Blood](0,7)];
puff.lifetime = int(12*sstr);
puff.size = 2.*str*FRandom[Blood](.6,1.4)*j;
puff.vel = ndir*j;
puff.sizestep = -.02*sstr*j;
level.SpawnParticle(puff);
}
}
let s = Spawn("mkBloodSmoke",pos);
s.SetShade(b.fillcolor);
@ -123,6 +137,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
Sector tracksector;
int trackplane;
TextureID pufftex[8];
FSpawnParticleParams puff;
Default
{
@ -216,11 +231,18 @@ Class mkBloodDrop : SWWMNonInteractiveActor
Vector3 ndiff = level.Vec3Diff(newpos,pos);
double ndist = ndiff.length();
ndiff /= ndist;
puff.lifetime = 10;
puff.startalpha = .5*alpha;
puff.sizestep = -1.*scale.x;
puff.accel = (0,0,-.5);
for ( int i=0; i<ndist; i++ )
{
if ( Random[Blood](0,2) ) continue;
Vector3 ppos = level.Vec3Offset(pos,ndiff*i)-pos;
A_SpawnParticleEx(fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,10,10.*scale.x*FRandom[Blood](.6,1.4),0,ppos.x,ppos.y,ppos.z,vel.x*.1+FRandom[Blood](-.1,.1),vel.y*.1+FRandom[Blood](-.1,.1),vel.z*.1+FRandom[Blood](-.1,.1),0,0,-.5,.5*alpha,-1,-1.*scale.x);
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 10.*scale.x*FRandom[Blood](.6,1.4);
puff.pos = level.Vec3Offset(pos,ndiff*i);
puff.vel = vel*.1+(FRandom[Blood](-.1,.1),FRandom[Blood](-.1,.1),FRandom[Blood](-.1,.1));
level.SpawnParticle(puff);
}
SetOrigin(newpos,true);
if ( (d.HitType == TRACE_HitFloor) || (pos.z <= floorz) )
@ -249,11 +271,22 @@ Class mkBloodDrop : SWWMNonInteractiveActor
if ( d.Hit3DFloor ) floordir = -d.Hit3DFloor.model.ceilingplane.Normal;
else floordir = d.HitSector.floorplane.Normal;
int numpt = Random[Blood](2,4);
puff.lifetime = 20;
puff.startalpha = .5*alpha;
puff.pos = pos;
puff.accel = (0,0,-.25);
for ( int i=0; i<numpt; i++ )
{
Vector3 ndir = (floordir+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.5).unit()*FRandom[Blood](.5,8.);
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticleEx(fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,20,10.*scale.x*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.5*alpha,-1,-1.*scale.x*j);
{
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 10.*scale.x*FRandom[Blood](.6,1.4)*j;
puff.pos = pos;
puff.vel = ndir*j;
puff.sizestep = -1.*scale.x*j;
level.SpawnParticle(puff);
}
}
Destroy();
return;
@ -279,11 +312,21 @@ Class mkBloodDrop : SWWMNonInteractiveActor
A_SetRenderStyle(1.,STYLE_Shaded);
frame = Random[Blood](5,8);
int numpt = Random[Blood](4,8);
puff.lifetime = 20;
puff.startalpha = .5*alpha;
puff.pos = pos;
puff.accel = (0,0,-.25);
for ( int i=0; i<numpt; i++ )
{
Vector3 ndir = (floordir+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.5).unit()*FRandom[Blood](.5,8.);
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticleEx(fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,20,10.*scale.x*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.5*alpha,-1,-1.*scale.x*j);
{
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 10.*scale.x*FRandom[Blood](.6,1.4)*j;
puff.vel = ndir*j;
puff.sizestep = -1.*scale.x*j;
level.SpawnParticle(puff);
}
}
vel *= 0;
return;
@ -324,11 +367,21 @@ Class mkBloodDrop : SWWMNonInteractiveActor
A_SetRenderStyle(1.,STYLE_Shaded);
frame = Random[Blood](9,12);
int numpt = Random[Blood](4,8);
puff.lifetime = 20;
puff.startalpha = .5*alpha;
puff.pos = pos;
puff.accel = (0,0,-.25);
for ( int i=0; i<numpt; i++ )
{
Vector3 ndir = (floordir+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.5).unit()*FRandom[Blood](.5,8.);
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticleEx(fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,20,10.*scale.x*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.5*alpha,-1,-1.*scale.x*j);
{
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 10.*scale.x*FRandom[Blood](.6,1.4)*j;
puff.vel = ndir*j;
puff.sizestep = -1.*scale.x*j;
level.SpawnParticle(puff);
}
}
vel *= 0;
return;
@ -347,11 +400,21 @@ Class mkBloodDrop : SWWMNonInteractiveActor
TraceBleedAngle(20,atan2(walldir.y,walldir.x),0);
A_StartSound("misc/blooddrop",volume:.1);
int numpt = Random[Blood](4,8);
puff.lifetime = 20;
puff.startalpha = .5*alpha;
puff.pos = pos;
puff.accel = (0,0,-.25);
for ( int i=0; i<numpt; i++ )
{
Vector3 ndir = (-(walldir.x,walldir.y,0)+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.5).unit()*FRandom[Blood](.5,8.);
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticleEx(fillcolor,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,20,10.*scale.x*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.5*alpha,-1,-1.*scale.x*j);
{
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 10.*scale.x*FRandom[Blood](.6,1.4)*j;
puff.vel = ndir*j;
puff.sizestep = -1.*scale.x*j;
level.SpawnParticle(puff);
}
}
Destroy();
return;
@ -377,6 +440,9 @@ Class mkBloodDrop : SWWMNonInteractiveActor
{
Super.PostBeginPlay();
for ( int i=0; i<8; i++ ) pufftex[i] = TexMan.CheckForTexture("graphics/Particles/xpuff"..i..".png");
puff.color1 = fillcolor;
puff.style = STYLE_Shaded;
puff.fadestep = -1;
SWWMHandler.QueueBlod(self);
int jumps = Random[Blood](0,3);
state dest = ResolveState("Spawn");
@ -447,7 +513,6 @@ Class mkBloodSmoke2 : mkBloodSmoke
}
// flying gibs
// inspired by Lud's Universal Gibs
Class mkFlyingGib : Actor
{
Mixin SWWMMissileFix;
@ -460,11 +525,16 @@ Class mkFlyingGib : Actor
mkFlyingGib prevmeat, nextmeat;
Vector3 oldpos;
TextureID pufftex[8];
FSpawnParticleParams puff;
override void PostBeginPlay()
{
Super.PostBeginPlay();
for ( int i=0; i<8; i++ ) pufftex[i] = TexMan.CheckForTexture("graphics/Particles/xpuff"..i..".png");
puff.style = STYLE_Shaded;
puff.lifetime = 40;
puff.accel = (0,0,-.25);
puff.fadestep = -1;
frame = Random[Blood](0,5);
double ang = FRandom[Gibs](0,360);
double pt = FRandom[Gibs](-60,20);
@ -479,6 +549,7 @@ Class mkFlyingGib : Actor
scale *= FRandom[Gibs](.5,1.5);
if ( master && master.bloodcolor ) shadecol = Color(master.bloodcolor.r/2,master.bloodcolor.g/2,master.bloodcolor.b/2);
else shadecol = Color(80,0,0);
puff.color1 = shadecol;
bleeding = true;
if ( Random[Blood](0,1) ) bXFlip = true;
SWWMHandler.QueueMeat(self);
@ -515,8 +586,13 @@ Class mkFlyingGib : Actor
for ( int i=0; i<ndist; i++ )
{
if ( Random[Blood](0,2) ) continue;
Vector3 ppos = level.Vec3Offset(oldpos,ndiff*i)-pos;
A_SpawnParticleEx(shadecol,pufftex[Random[Blood](0,7)],STYLE_Shaded,0,40,20.*scale.x*FRandom[Blood](.6,1.4),0,ppos.x,ppos.y,ppos.z,vel.x*.1+FRandom[Blood](-1.,1.),vel.y*.1+FRandom[Blood](-1.,1.),vel.z*.1+FRandom[Blood](-1.,1.),0,0,-.25,.5*alpha,-1,-.5*scale.x);
puff.texture = pufftex[Random[Blood](0,7)];
puff.size = 20.*scale.x*FRandom[Blood](.6,1.4);
puff.pos = level.Vec3Offset(oldpos,ndiff*i);
puff.vel = vel*.1+(FRandom[Blood](-.1,.1),FRandom[Blood](-.1,.1),FRandom[Blood](-.1,.1));
puff.startalpha = .5*alpha;
puff.sizestep = -.5*scale.x;
level.SpawnParticle(puff);
}
}

View file

@ -844,11 +844,16 @@ Class SWWMTeleportSparkle : SWWMNonInteractiveActor
Class SWWMTeleportDest : SWWMNonInteractiveActor
{
TextureID flaretex;
FSpawnParticleParams flare;
override void PostBeginPlay()
{
special1 = Random[ExploS](0,10);
flare.color1 = "88 AA FF";
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT;
flare.fadestep = -1;
}
override void Tick()
@ -860,14 +865,19 @@ Class SWWMTeleportDest : SWWMNonInteractiveActor
}
if ( isFrozen() ) return;
if ( (level.maptime+special1)%10 ) return;
if ( !flaretex ) flaretex = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.pos = pos+(0,0,28);
int numpt = Random[ExploS](0,2);
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90);
Vector3 pvel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](.2,.8);
A_SpawnParticleEx("88 AA FF",flaretex,STYLE_AddShaded,SPF_FULLBRIGHT,Random[ExploS](120,240),FRandom[ExploS](2.,4.),0,0,0,28,pvel.x,pvel.y,pvel.z,0,0,0,FRandom[ExploS](.15,.3),-1,FRandom[ExploS](-.02,-.01));
flare.lifetime = Random[ExploS](120,240);
flare.size = FRandom[ExploS](2.,4.);
flare.sizestep = FRandom[ExploS](-.02,-.01);
flare.vel = pvel;
flare.startalpha = FRandom[ExploS](.15,.3);
level.SpawnParticle(flare);
}
}
}
@ -875,11 +885,16 @@ Class SWWMTeleportDest : SWWMNonInteractiveActor
Class SWWMTeleportLine : SWWMNonInteractiveActor
{
Line tline;
TextureID flaretex;
FSpawnParticleParams flare;
override void PostBeginPlay()
{
special1 = Random[ExploS](0,5);
flare.color1 = "88 AA FF";
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT;
flare.fadestep = -1;
}
override void Tick()
@ -896,7 +911,6 @@ Class SWWMTeleportLine : SWWMNonInteractiveActor
}
if ( isFrozen() ) return;
if ( (level.maptime+special1)%5 ) return;
if ( !flaretex ) flaretex = TexMan.CheckForTexture("graphics/Particles/xflare.png");
Vector3 apos, bpos;
apos.xy = tline.v1.p;
bpos.xy = tline.v2.p;
@ -908,10 +922,16 @@ Class SWWMTeleportLine : SWWMNonInteractiveActor
{
double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90);
Vector3 pvel = SWWMUtility.Vec3FromAngles(ang,pt)*FRandom[ExploS](.0,.3);
double d = FRandom[ExploS](0.,1.);
Vector3 ppos = bpos*d+apos*(1.-d)+(0,0,FRandom[ExploS](1,4));
Vector3 rpos = ppos-pos;
A_SpawnParticleEx("88 AA FF",flaretex,STYLE_AddShaded,SPF_FULLBRIGHT,Random[ExploS](120,240),FRandom[ExploS](2.,4.),0,rpos.x,rpos.y,rpos.z,FRandom[ExploS](-.3,.3),FRandom[ExploS](-.3,.3),FRandom[ExploS](-.3,.3),0,0,FRandom[ExploS](.05,.1),FRandom[ExploS](.15,.3),-1,FRandom[ExploS](-.02,-.01));
flare.lifetime = Random[ExploS](120,240);
flare.size = FRandom[ExploS](2.,4.);
flare.sizestep = FRandom[ExploS](-.02,-.01);
flare.pos = bpos*d+apos*(1.-d)+(0,0,FRandom[ExploS](1,4));
flare.vel = pvel;
flare.accel = (0,0,FRandom[ExploS](.05,.1));
flare.startalpha = FRandom[ExploS](.15,.3);
level.SpawnParticle(flare);
}
}
}
@ -969,7 +989,7 @@ Class SWWMTeleportFog : SWWMNonInteractiveActor
Class SWWMPickupFlash : SWWMNonInteractiveActor
{
Vector3 lastitempos;
TextureID flaretex;
FSpawnParticleParams flare;
Default
{
@ -983,8 +1003,15 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
{
Super.PostBeginPlay();
frame = Args[0];
if ( CurState == ResolveState("Pickup") )
WorldOffset = (0,0,16);
if ( CurState != ResolveState("Pickup") ) return;
WorldOffset = (0,0,16);
flare.color1 = Color(Args[1]*85,Args[2]*85,Args[3]*85);
flare.texture = TexMan.CheckForTexture("graphics/Particles/xflare.png");
flare.style = STYLE_AddShaded;
flare.flags = SPF_FULLBRIGHT;
flare.lifetime = 30;
flare.accel = (0,0,.05);
flare.fadestep = -1;
}
void A_Sparkle()
{
@ -1038,9 +1065,8 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
// nearby sparkles
if ( !SWWMUtility.SphereIntersect(self,players[consoleplayer].Camera.pos,500) )
return;
if ( !flaretex ) flaretex = TexMan.CheckForTexture("graphics/Particles/xflare.png");
Color pcol = Color(Args[1]*85,Args[2]*85,Args[3]*85);
double alph = clamp((250000.-Distance3DSquared(players[consoleplayer].Camera))/250000.,0.,1.);
flare.startalpha = alph;
int numpt = Random[ClientSparkles](1,3);
for ( int i=0; i<numpt; i++ )
{
@ -1048,8 +1074,11 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
double pt = FRandom[ClientSparkles](0,360);
double dst = FRandom[ClientSparkles](4,16);
Vector3 dir = SWWMUtility.Vec3FromAngles(ang,pt);
Vector3 ppos = (0,0,16+GetBobOffset())+dir*dst;
A_SpawnParticleEx(pcol,flaretex,STYLE_AddShaded,SPF_FULLBRIGHT,30,FRandom[ExploS](2.,3.),0,ppos.x,ppos.y,ppos.z,dir.x*.2,dir.y*.2,dir.z*.2,0,0,.05,alph,-1,FRandom[ExploS](-.04,-.02));
flare.size = FRandom[ExploS](2.,3.);
flare.pos = pos+(0,0,16+GetBobOffset())+dir*dst;
flare.vel = dir*.2;
flare.sizestep = FRandom[ExploS](-.04,-.02);
level.SpawnParticle(flare);
}
}
States
@ -1359,11 +1388,15 @@ Class SWWMShadow : SWWMNonInteractiveActor
Class SWWMBaseSplash : SWWMNonInteractiveActor abstract
{
TextureID pufftex[8];
FSpawnParticleParams puff;
abstract void DoSplash();
void Splash()
{
puff.style = STYLE_Shaded;
puff.fadestep = -1;
puff.pos = pos;
for ( int i=0; i<8; i++ )
pufftex[i] = TexMan.CheckForTexture("graphics/Particles/xpuff"..i..".png");
DoSplash();
@ -1380,6 +1413,8 @@ Class SWWMWaterSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 60;
puff.startalpha = .5;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1390,7 +1425,13 @@ Class SWWMWaterSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.);
dir *= str*.25;
dir.z += 1.;
A_SpawnParticleEx(SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,60,str,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
@ -1399,6 +1440,8 @@ Class SWWMWaterSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 50;
puff.startalpha = .5;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1409,7 +1452,13 @@ Class SWWMWaterSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.);
dir *= str*.25;
dir.z += .35;
A_SpawnParticleEx(SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,50,str,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
@ -1418,6 +1467,8 @@ Class SWWMBloodSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 60;
puff.startalpha = .5;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1428,7 +1479,13 @@ Class SWWMBloodSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.);
dir *= str*.25;
dir.z += 1.;
A_SpawnParticleEx(SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,60,str+.5,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+.5;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
@ -1437,6 +1494,8 @@ Class SWWMBloodSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 50;
puff.startalpha = .5;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1447,7 +1506,13 @@ Class SWWMBloodSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.);
dir *= str*.25;
dir.z += .35;
A_SpawnParticleEx(SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,50,str+.5,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+.5;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
@ -1456,6 +1521,8 @@ Class SWWMSludgeSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 40;
puff.startalpha = .8;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1466,7 +1533,13 @@ Class SWWMSludgeSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.);
dir *= str*.25;
dir.z += .4;
A_SpawnParticleEx(SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
@ -1475,6 +1548,8 @@ Class SWWMSludgeSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 30;
puff.startalpha = .8;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1485,7 +1560,13 @@ Class SWWMSludgeSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.);
dir *= str*.25;
dir.z += .15;
A_SpawnParticleEx(SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
@ -1494,6 +1575,8 @@ Class SWWMMudSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 40;
puff.startalpha = .8;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1504,7 +1587,13 @@ Class SWWMMudSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.);
dir *= str*.25;
dir.z += .4;
A_SpawnParticleEx(SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
@ -1513,6 +1602,8 @@ Class SWWMMudSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 30;
puff.startalpha = .8;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1523,7 +1614,13 @@ Class SWWMMudSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.);
dir *= str*.25;
dir.z += .15;
A_SpawnParticleEx(SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_Shaded,0,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
@ -1532,6 +1629,10 @@ Class SWWMSlimeSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 40;
puff.startalpha = .8;
puff.style = STYLE_AddShaded;
puff.flags = SPF_FULLBRIGHT;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1542,7 +1643,13 @@ Class SWWMSlimeSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,8.);
dir *= str*.25;
dir.z += .4;
A_SpawnParticleEx(SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_AddShaded,SPF_FULLBRIGHT,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
@ -1551,6 +1658,10 @@ Class SWWMSlimeSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 30;
puff.startalpha = .8;
puff.style = STYLE_AddShaded;
puff.flags = SPF_FULLBRIGHT;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1561,7 +1672,13 @@ Class SWWMSlimeSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,4.);
dir *= str*.25;
dir.z += .15;
A_SpawnParticleEx(SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_AddShaded,SPF_FULLBRIGHT,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+2.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
@ -1570,6 +1687,10 @@ Class SWWMLavaSplash : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 40;
puff.startalpha = .8;
puff.style = STYLE_AddShaded;
puff.flags = SPF_FULLBRIGHT;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<60; i++ )
@ -1580,7 +1701,13 @@ Class SWWMLavaSplash : SWWMBaseSplash
str = FRandom[ExploS](2.,12.);
dir *= str*.35;
dir.z += .6;
A_SpawnParticleEx(SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_AddShaded,SPF_FULLBRIGHT,40,str+1.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+1.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
let s = Spawn("SWWMSizzleSmoke",pos);
s.target = target;
@ -1590,6 +1717,10 @@ Class SWWMLavaSplash2 : SWWMBaseSplash
{
override void DoSplash()
{
puff.lifetime = 30;
puff.startalpha = .8;
puff.style = STYLE_AddShaded;
puff.flags = SPF_FULLBRIGHT;
double ang, pt, str;
Vector3 dir;
for ( int i=0; i<15; i++ )
@ -1600,7 +1731,13 @@ Class SWWMLavaSplash2 : SWWMBaseSplash
str = FRandom[ExploS](1.,6.);
dir *= str*.35;
dir.z += .2;
A_SpawnParticleEx(SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)),pufftex[Random[ExploS](0,7)],STYLE_AddShaded,SPF_FULLBRIGHT,30,str+1.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
puff.color1 = SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.));
puff.texture = pufftex[Random[ExploS](0,7)];
puff.size = str+1.;
puff.sizestep = -.02*str;
puff.vel = dir;
puff.accel = (0,0,-.03*str);
level.SpawnParticle(puff);
}
let s = Spawn("SWWMSizzleSmoke2",pos);
s.target = target;