// --------------------------------------------------------------------------
//
// Utility step
//
// --------------------------------------------------------------------------

actor Step 21150 {
	//$Category Objects
	+SHOOTABLE
	+NOBLOOD
	+SOLID
	+NOGRAVITY
	health 200
	speed 0
	radius 32
	height 14
	mass 0x7FFFFFFF
	scale 0.25
	renderstyle Translucent
	alpha 0.0
	damagefactor "Disarm", 0.0
	damagefactor "Flash", 0.0
	damagefactor "Fist", 0.1
	DamageFactor "Knife", 1.0
	DamageFactor "Ice", 0.0
	tag "Step"
	
	states {
	Spawn:
		TNT1 A 0 A_CheckSight("Death.Deconstruction")
		USTP AAAAAAAAAA 3 A_FadeIn(0.1)
		USTP A 0 A_SetTranslucent(1.0,0)
		USTP A 35 
		goto Idle
	Idle:
		USTP A -1
		loop
	Death:  
		TNT1 A 0 
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx ("ExplosionMain", 0, 0, 32)
		TNT1 A 0 A_PlaySound ("weapons/rocklx")
		TNT1 A 1
		stop
	Death.Knife:
	Death.Deconstruction:
		"----" A 0 A_NoBlocking
		"----" A 2 A_PlaySound ("utility/deconstruct")
		"----" AAAAAAAAAA 2 A_Fadeout(0.1) 
		stop
	}
}

// =============================================================================
// Sandbag wall
actor SandbagWall 21151 {
	//$Category Objects
	+NOBLOOD
	+ISMONSTER
	Health 650
	Speed 0
	Radius 40
	Height 64
	Mass 0x7FFFFFFF
	Scale 0.35
	RenderStyle translucent
	Alpha 0.0
	DamageFactor "Energy", 1.25
	DamageFactor "Disarm", 0.0
	DamageFactor "Knife", 1.0
	DamageFactor "Ice", 0.0
	Tag "Sandbag wall"
	States {
	Spawn:
		BAGG A 0
		TNT1 A 0 A_CheckSight("Death.Deconstruction")
		BAGG AAAAAAAAAA 3 A_FadeIn (0.1)
		BAGG A 70
		BAGG A 0 A_SetTranslucent (1.0, 0)
		BAGG A 0 A_SetSolid
		BAGG A 0 A_SetShootable
		BAGG A 35 A_Gravity
		BAGG A 0 A_SpawnItemEx ("SandbagWallSideBlocker", 0,32,0,0,0,0, 0, SXF_SETMASTER) // [Cata] Fix sandbag glitchyness
		BAGG A -1 A_SpawnItemEx ("SandbagWallSideBlocker", 0,-32,0,0,0,0, 0, SXF_SETMASTER)
		stop
	Death:
		TNT1 A 0
		TNT1 A 0 A_RemoveChildren (1)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx ("ExplosionMain", 0, 0, 32)
		TNT1 A 0 A_PlaySound ("weapons/rocklx")
		TNT1 A 1
		stop
	Death.Knife:
	Death.Deconstruction:
		"----" A 0 A_NoBlocking
		"----" A 0 A_RemoveChildren (1)
		"----" A 2 A_PlaySound ("utility/deconstruct")
		"----" A 2 A_Fadeout(0.1) 
		wait
	}
}

actor SandbagWallSideBlocker {
	+SOLID
	+ISMONSTER
	Radius 16
	Height 64
	Mass 0x7FFFFFFF
	States {
	Spawn:
		TNT1 A -1
		stop
	}
}
