//desc:haze TeamFortress EMP grenade & tarbaby explosion (heavily modified from jedilammas)
r_part_sparks_trifan 1
r_bouncysparks 1

r_part te_tarexplosion
{
	texture "particles/duolight02grey.tga"
	count 140
	scale 40
	alpha 0.2
	die 0.3
	randomvel 0
	veladd -11
	rgb 128 255 76
	rgbdelta 0 0 0
	gravity 0
	friction -0.9
	blend add
	spawnmode uniformcircle
	spawnorg 64 0 
	spawnvel 366 0
	scalefactor 1
	emit empelectric
	emitinterval 0.01
	lighttime 0.3
	lightshadows 0
	lightradius 350
	lightrgb 0.27 .27 1
}

r_part +te_tarexplosion
{
	texture "particles/flame.tga"
	count 30
	scale 1
	alpha 0.4
	die 0.5
	randomvel 100 0
	rgb 128 128 255	
	rgbdelta 0 0 0
	gravity 200
	friction 0
	stains 0
	blend add
	spawnmode circle
	spawnvel 200 0
	scalefactor 1	
	emit 2shockwave
	emitinterval 0.1
	up 15
}

r_part +te_tarexplosion
{
	texture "particles/spot01drk.tga"
	count	11
	scale  80
	alpha 0.4
	die 0.5
	randomvel 20
	veladd -111
	rgb 128 128 255
	gravity 0
	friction 0.2
	stains 0
	blend add
	spawnmode circle
	spawnorg 44 44
	spawnvel 42 0
	scalefactor 1
	scaledelta 5
}
r_part +te_tarexplosion
{
	texture "particles/generic.png"
	count	5
	scale 5
	alpha 0.4
	die 0.5
	randomvel 5
	veladd 0
	rgbdelta 240 -270 0
	rgb 0 255 255 
	gravity 0
	friction 2
	blend add
	cliptype littlebits
	clipcount 1
	spawnorg 1 1 	
	spawnvel 64 64
	emit littlebits2
	emitinterval 0.1
	scalefactor 1
	spawnmode circle
}

r_part +te_tarexplosion
{
	texture "particles/generic.png"
	count 11
	scale 111
	alpha 0.6
	die 0.4
	randomvel 32
	veladd 10
	rgb 128 255 76
	rgbdelta 0 0 0
	gravity 0
	blend add
	scalefactor 1
	scaledelta -50
}

r_part cte_greenexplosion
{
	texture "particles/generic.png"
	count 11
	scale 111
	alpha 0.6
	die 0.4
	randomvel 32
	veladd 10
	rgb 128 255 76
	rgbdelta 0 0 0
	gravity 0
	blend add
	scalefactor 1
	scaledelta -50
}

r_part empcentral
{
	texture "particles/spot01drk.tga"
	count	11
	scale  80
	alpha 0.4
	die 0.5
	randomvel 20
	veladd -111
	rgb 128 128 255
	gravity 0
	friction 0.2
	stains 0
	blend add
	assoc littlebits
	spawnmode circle
	spawnorg 44 44
	spawnvel 42 0
	scalefactor 1
	scaledelta 5
}

r_part empinner
{
	texture "particles/flame.tga"
	count	30
	scale 1
	alpha 0.4
	die 0.5
	randomvel 100 0
	rgb 128 128 255	
	rgbdelta 0 0 0
	gravity 200
	friction 0
	stains 0
	blend add
	assoc empcentral
	spawnmode circle
	spawnvel 200 0
	scalefactor 1	
	emit 2shockwave
	emitinterval 0.1
	up 15
}

r_part empelectric
{
	texture ""
	count 5
	alpha 0.4
	die 0.2
	diesubrand 0.3
	randomvel 76
	veladd 0
	rgb 0 255 255
	rgbdelta 0 -555 -255
	gravity 0
	blend add
	scalefactor 1
}

r_part littlebits
{
	texture "particles/generic.png"
	count	5
	scale 5
	alpha 0.4
	die 0.5
	randomvel 5
	veladd 0
	rgbdelta 240 -270 0
	rgb 0 255 255 
	gravity 0
	friction 2
	blend add
	cliptype littlebits
	clipcount 1
	spawnorg 1 1 	
	spawnvel 64 64
	assoc cte_greenexplosion
	emit littlebits2
	emitinterval 0.1
	scalefactor 1
	spawnmode circle
}

r_part littlebits2
{
	texture ""
	count	5
	alpha 0.3
	rgb 120 120 255
	scale 15 
	die 0.3
	gravity 0
	friction 2
	blend add
	spawnorg 1 0
	spawnvel 85 0
	spawnmode uniformcircle
	randomvel 333
	scalefactor 1
}

r_part 2shockwave
{
	texture ""
	count 15
	scalerand 10
	scale 11
	scalefactor 1
	die 0.2
	alpha 0.05
	rgb 35 125 68
	blend add
	spawnmode uniformcircle
	spawnorg 0 140
	spawnvel 288 0
	randomvel 100 0
	rotationstart 0 360
	up -5
	rampmode delta
	ramp 0 0 0 0.1
	ramp -33 -55 -66 0.1
}