adapted remaining usages of ExploSmoke* to new particle system

stable-5.4
David Dormagen 2013-11-16 19:30:50 +01:00
parent 241ea62d0f
commit 875823644d
15 changed files with 25 additions and 62 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

View File

@ -1,12 +0,0 @@
[Particle]
Name=Blast
MaxCount=300
InitFn=StdInit
ExecFn=StdExec
DrawFn=Std
Face=0,0,40,40,-20,-20
Delay=1
AlphaFade=1
Repeats=1
Reverse=1
Additive=1

View File

@ -1,11 +0,0 @@
[Particle]
Name=ExploSmoke
MaxCount=800
InitFn=StdInit
ExecFn=StdExec
DrawFn=Std
Face=0,0,64,64,-32,-32
Delay=0
Repeats=1
AlphaFade=1
FadeDelay=2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,11 +0,0 @@
[Particle]
Name=ExploSmokeFastFade
MaxCount=800
InitFn=StdInit
ExecFn=StdExec
DrawFn=Std
Face=0,0,64,64,-32,-32
Delay=0
Repeats=1
AlphaFade=2
FadeDelay=1

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,3 @@
[Particle]
Name=SmokeThick
Face=0,0,64,64,-32,-32

View File

@ -170,12 +170,10 @@ private func FireWeapon(object clonk, int angle)
if(Abs(Normalize(angle,-180)) > 90)
IY=Cos(180-angle,MuzzleDown)+MuzzleOffset;
for(var i=0; i<10; ++i)
{
var speed = RandomX(0,10);
var r = angle;
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2),-Cos(r,speed)+RandomX(-2,2),RandomX(100,400),RGBa(255,255,255,50));
}
var x = Sin(angle, 20);
var y = -Cos(angle, 20);
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),450,RGB(255,255,255),clonk);
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());

View File

@ -59,7 +59,7 @@ func DoExplode()
Sound("BlastLiquid2");
else
Sound("BlastMetal");
CreateParticle("ExploSmoke", 0,0,0,0,390,RGBa(255,255,255,165));
CreateParticleEx("Smoke", PV_Random(-30, 30), PV_Random(-30, 30), 0, 0, PV_Random(40, 60), Particles_Smoke(), 60);
Explode(24);
}

View File

@ -168,12 +168,10 @@ private func FireWeapon(object clonk, int angle)
Sound("GunShoot?");
// Muzzle Flash & gun smoke
for(var i=0; i<10; ++i)
{
var speed = RandomX(0,10);
var r = angle;
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2),-Cos(r,speed)+RandomX(-2,2),RandomX(100,400),RGBa(255,255,255,50));
}
var x = Sin(angle, 20);
var y = -Cos(angle, 20);
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),450,RGB(255,255,255),clonk);
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
}

View File

@ -56,7 +56,7 @@ protected func FxWorkingTimer()
private func Smoking()
{
if(Random(3)) CreateParticle("ExploSmoke", -10,-40, 0,-5,100 + Random(150),RGBa(128,255,128,55));
Smoke(-10, -40, 6);
}
local ActMap = {

View File

@ -22,5 +22,5 @@ func Hit()
func DoSmoke()
{
++time;
CreateParticle("ExploSmokeFastFade", RandomX(-5,5), RandomX(-5,5), 0, 0, Max(10, 300 - time * 5), RGB(100, 100, 100));
Smoke(RandomX(-5, 5), RandomX(-5, 5), 2);
}

View File

@ -79,8 +79,8 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
CreateParticleEx("Fire", -10 * GetCalcDir(), 20, PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(18, 36), Particles_Fire(), 2);
// Smoke from the pipes.
CreateParticle("ExploSmoke", -9*GetCalcDir(), -31, RandomX(-2,1), -7 + RandomX(-2,2), RandomX(60,125), RGBa(255,255,255,50));
CreateParticle("ExploSmoke", -16*GetCalcDir(), -27, RandomX(-1,2), -7 + RandomX(-2,2), RandomX(30,90), RGBa(255,255,255,50));
Smoke( -9*GetCalcDir(), -31, 6);
Smoke(-16*GetCalcDir(), -27, 3);
// Furnace sound after some time.
if (time == 30)

View File

@ -69,12 +69,10 @@ public func ContainedUseStop(object clonk, int ix, int iy)
var IX = Sin(GetR(), 30);
var IY = -Cos(GetR(), 30);
for(var i=0; i<10; ++i)
{
var speed = RandomX(0,10);
var r = angle;
CreateParticle("ExploSmoke",IX,IY,+Sin(r,speed)+RandomX(-2,2) + GetXDir()/2,-Cos(r,speed)+RandomX(-2,2) + GetYDir()/2,RandomX(100,400),RGBa(255,255,255,50));
}
var x = Sin(angle, 20);
var y = -Cos(angle, 20);
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
CreateParticle("MuzzleFlash",IX,IY,+Sin(angle,500),-Cos(angle,500),600,RGB(255,255,255),this);
CreateParticleEx("Flash", 0, 0, GetXDir(), GetYDir(), 8, Particles_Flash());

View File

@ -276,11 +276,11 @@ protected func DoFire(object iammo, object clonk, int angle)
var px = Cos(r/angPrec - 90,dist);
var py = Sin(r/angPrec - 90,dist) - 4;
CreateParticleEx("Flash", px, py, 0, 0, 8, Particles_Flash());
for(var i=0; i<15; ++i) //liberated from musket script... I'm horrible at particles :p
{
var speed = RandomX(0,10);
CreateParticle("ExploSmoke",px,py,+Sin(r/angPrec,speed)+RandomX(-2,2),-Cos(r/angPrec,speed)+RandomX(-2,2),RandomX(100,400),RGBa(255,255,255,75));
}
var x = Sin(r/angPrec, 20);
var y = -Cos(r/angPrec, 20);
CreateParticleEx("Smoke", px, py, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
CreateParticle("MuzzleFlash",px,py,px,py+4,700,RGB(255,255,255)); //muzzle flash uses speed as Rotation... so I negate the -4
//sound