/////////////////////////////////////////////////////////////////////////
// SFX definitions
/////////////////////////////////////////////////////////////////////////

//SMOKE
////////////////
actor general_smoke1 {
	radius 4
	height 4
	scale 1
	alpha 1
	renderstyle translucent
	+NOTELEPORT
	+FLOORCLIP
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+NOINTERACTION
	+CLIENTSIDEONLY
	states{
		spawn:
			TNT1 A 0
			goto selectjump
		selectjump:
			TNT1 A 0 A_Jump(255, "s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24")
		s1:
			SMK5 A 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s2:
			SMK5 B 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s3:
			SMK5 C 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s4:
			SMK5 D 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s5:
			SMK5 E 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s6:
			SMK5 F 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s7:
			SMK5 G 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s8:
			SMK5 H 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s9:
			SMK5 I 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s10:
			SMK5 J 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s11:
			SMK5 K 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s12:
			SMK5 L 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s13:
			SMK5 M 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s14:
			SMK5 N 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s15:
			SMK5 O 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s16:
			SMK5 P 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s17:
			SMK5 Q 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s18:
			SMK5 R 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s19:
			SMK5 S 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s20:
			SMK5 T 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s21:
			SMK5 U 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s22:
			SMK5 V 4 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s23:
			SMK5 W 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
		s24:
			SMK5 X 3 A_ScaleVelocity(0.9)
			TNT1 A 0 A_FadeOut(0.05)
			loop
			
	}
}

//powerpunch smokes
actor powpunch_smoke : general_smoke1 {
	scale 0.3
	alpha 1.0
	renderstyle add
}

actor powpunch_smoke2 : general_smoke1 {
	scale 0.4
	alpha 1.0
	renderstyle add
}

actor powpunch_smoke3 : general_smoke1 {
	scale 0.5
	alpha 1.0
	renderstyle add
}


//frag smokes
actor frag_boomsmoke : general_smoke1 {
	scale 0.58
	alpha 0.65
	renderstyle translucent
}

actor frag_boomsmoke2 : general_smoke1 {
	scale 0.68
	alpha 0.85
	renderstyle translucent
}


actor f_bfireSpark-smoke : general_smoke1 {
	scale 0.22
	alpha 0.7
	renderstyle translucent
	states{
		spawn:
			TNT1 A 3
			goto selectjump
	}
}

actor powfrag_smoke : general_smoke1 {
	scale 0.1
	alpha 0.8
	renderstyle add
}

actor powfragMAX_smoke : general_smoke1{
	scale 0.15
	renderstyle add
	alpha 0.9
}

actor sgauss_casing_smoke : general_smoke1{
	scale 0.06
	renderstyle add
	alpha 0.8
}


//autocannon smokes
actor cslugboom_smoke : general_smoke1 {
	scale 0.5
	alpha 0.66
	renderstyle translucent
}

//gauss rifle smokes
actor gpuff_smoke : general_smoke1 {
	scale 0.3
	alpha 1.0
	renderstyle add
}


/////////////////

//melee
actor punch_impact {		
	DamageType MeleeAttack
	Obituary "%o was punched by %k"
	+NOGRAVITY
	+NOBLOCKMAP
	+FLOORCLIP
	+NOTELEPORT
	+PUFFONACTORS
	+NOEXTREMEDEATH
	+NOINTERACTION
	+CLIENTSIDEONLY
	States{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("sfx/punchwall")
			Stop
		xdeath:
			TNT1 A 0 A_PlaySound("sfx/fleshhit")
			Stop
	}
}

actor meleepuff : punch_impact {
	Obituary "%o got beat down by %k"
	States{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("sfx/hitwall")
			Stop
		xdeath:
			TNT1 A 0 A_PlaySound("sfx/fleshhit")
			Stop
	}
}


/////////////////////////////////////////////////////////////////////////////////////////////



//
actor pistb_puff {		
	Radius 1
	Height 1
	Alpha 1
	DamageType pistol_bullet
	RenderStyle ADD
	Scale 0.14
	+NOGRAVITY
	+NOBLOCKMAP
	+FLOORCLIP
	+NOTELEPORT
	+FORCEXYBILLBOARD
	+NOEXTREMEDEATH
	+NOINTERACTION
	+CLIENTSIDEONLY
	States{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("sfx/bulletric")
			TNT1 A 0 A_Jump(100, "Puff1","Puff2","Puff3","Puff4")
		Puff1:
			IPF2 AB 1 bright  
			goto PuffSparks
		Puff2:
			IPF2 CD 1 bright  
			goto PuffSparks
		Puff3:
			IPF2 EF 1 bright  
			goto PuffSparks
		Puff4:
			IPF2 GH 1 bright  
			goto PuffSparks
		PuffSparks:
			//NULL AAAAAA 0 A_SpawnItemEx ("puffSpark", 0, 0, 0, random(-3,3) , random(-3,3) , random(0,8) , random(1,360), 0) 
			NULL AAAAAA 0 A_SpawnItemEx ("puffSpark", 0, 0, 0, random(-3,3) , random(-3,3) , random(-3,3) , random(1,360), 0) 
			NULL A 1 A_SpawnItemEx ("puffSmoke", 0, 0, 0, 0, 0, 1, 0, 0) 
			stop
	}
}



actor puffSpark {
	//Health 10
	radius 1
	height 1
	speed  5
	damage 0
	RenderStyle add
	Alpha 1
	Scale 0.02
	Mass 0
	+MISSILE
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	+FORCEXYBILLBOARD
	+NOGRAVITY
	+CLIENTSIDEONLY
	BounceType "doom"
	//gravity 0.2
	BounceFactor 0.2
	States
	{
		spawn:			
			SPRK A 2 bright A_FadeOut(0.25)
			loop

	}
}


actor puffSmoke {
	radius 1
	height 1
	alpha 1
	scale 0.12
	renderstyle add
	+NOGRAVITY
	+NOTELEPORT
	+FORCEXYBILLBOARD
	+NOINTERACTION
	+CLIENTSIDEONLY
	states{
		spawn:
			SMK3 ABCDEFGHIJKLM 1
			stop
			
	}
}

actor puffSmoke2 : puffSmoke {
	scale 0.16
}

actor arb_puff : pistb_puff {		
	DamageType arifle_bullet
	Scale 0.12
	States{
		PuffSparks:
			NULL AAAA 0 A_SpawnItemEx ("puffSpark", 0, 0, 0, random(-3,3) , random(-3,3) , random(0,8) , random(1,360), 0) 
			NULL A 1 A_SpawnItemEx ("puffSmoke", 0, 0, 0, 0, 0, 0, 0, 0) 
			stop
	}
}

actor ashot_puff : pistb_puff {		
	DamageType ashot_buck
	Scale 0.08
	States{
	PuffSparks:
			NULL AAA 0 A_SpawnItemEx ("puffSpark", 0, 0, 0, random(-3,3) , random(-3,3) , random(0,8) , random(1,360), 0) 
			NULL A 1 A_SpawnItemEx ("puffSmoke", 0, 0, 0, 0, 0, 0, 0, 0) 
			stop
	}
}

//////////////////////////

actor gun_heatsteam_spawner {
	radius 1
	height 1
	speed 15
	PROJECTILE
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY
	states{
		spawn:
			NULL A 1
			NULL A 0 
		death:
			NULL A 0 A_SpawnItemEx ("gun_heatsteam", 0, 0, 0, random(3,4), random(-1,1), 2, 0, SXF_TRANSFERPITCH)
			stop
	}
}

actor crifle_heatsteam_spawner : gun_heatsteam_spawner {
	states{
		spawn:
			NULL A 1
			NULL A 0 
		death:
			NULL A 0 A_SpawnItemEx ("crifle_heatsteam", 0, 0, 0, random(3,4), random(-2,2), 2, 0, SXF_TRANSFERPITCH)
			stop
	}
}

actor gun_heatsteam {
	radius 3
	height 3
	scale 0.5
	renderstyle add
	alpha 0.4
	damage 0
	speed 0
	+RIPPER
	+NOTELEPORT
	//+NOCLIP
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+CLIENTSIDEONLY
	states{
		spawn:
			SMK7 ABCDEFGHIJKLMNOPQ 1 bright A_Explode(2,4,0,0)
		endloop:
			TNT1 A 0 A_Explode(1,4,0,0)
			SMK7 R 1 bright A_FadeOut (0.1) 
			loop
	}
}

actor crifle_heatsteam : gun_heatsteam {
	Translation "0:255=%[0.0,0.0,0.0]:[0.2,1.0,0.0]"
}

