ACTOR ExplosiveBarrel1 Replaces ExplosiveBarrel
{
	Game Doom
    damagefactor "Trample", 0.0
    damagefactor "Kick", 0.1
    damagefactor "Melee", 0.1
	damagefactor "Fatality", 10.1
	damagefactor "SuperPunch", 10.1
damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0 damagefactor "MinorHead", 0.0
	SpawnID 125
	Health 20
	Radius 10
	Height 34
    Mass 200
	DamageType ExplosiveImpact
	+SOLID
	+SHOOTABLE
	+NOBLOOD
	+ACTIVATEMCROSS
	+NOICEDEATH
    +PUSHABLE
	+SLIDESONWALLS
    +WINDTHRUST
    +TELESTOMP
	+NOBLOCKMONST
	PainChance "Kick", 255
	DeathSound "Explosion"
	Obituary "$OB_BARREL"
	States
	{
	Spawn:
		BAR1 AB 4
		Loop
    Pain.Kick:
        BAR1 A 1 A_FaceTarget
		TNT1 A 0 A_Recoil(5)
		TNT1 A 0 ThrustThingZ(0,10,0,1)
        Goto Spawn
	Death:
        BAR1 A 1 BRIGHT
        BEXP ABCD 2 BRIGHT
		
        TNT1 A 0 A_AlertMonsters
        TNT1 A 0 A_SpawnItemEx ("BarrelExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 180), 2, random (0, 180))
	    EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
		BEXP B 0 BRIGHT A_Scream
        TNT1 AAAA 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAAAA 0 A_CustomMissile ("BarrelParticle", 35, 0, random (0, 360), 2, random (0, 160))
		
		TNT1 AAA 4 
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 4 A_CustomMissile ("ExplosionSmoke", 1, 0, random (0, 360), 2, random (50, 130))

		BEXP Z 600 BRIGHT A_BarrelDestroy
		BEXP Z 5 A_Respawn
		Wait
		
	 Death.SuperPunch:	
	 Death.Fatality:
        TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_GiveToTarget("HasBarrel", 1)
        Stop
	}
}