Actor BetterBarrel : ExplosiveBarrel Replaces ExplosiveBarrel
{
	var int user_i;

	-NOBLOOD

	Height 38
	Radius 18
	XScale 1.2
	YScale 0.8
	BloodColor "Green"
	States
	{
	Spawn:
		TNT1 A 0
		{
			A_SetHealth(Random(20, 50));
			for (user_i = 0; user_i < Random(4, 6); user_i++)
			{
				A_SpawnParticle("Green", SPF_FULLBRIGHT, 35 * Random(1, 3), FRandom(4, 8), 0, FRandom(-4, 4), FRandom(-4, 4), 36, 0, 0, FRandom(0.1, 0.3));
			}
		}
		BAR1 AAABBB 6 A_StartSound("bubble", CHAN_BODY, CHANF_OVERLAP, 0.1, ATTN_NORM, FRandom(0.2,0.5), FRandom(0.0,0.3))
		LOOP
	Death:
		TNT1 A 0
		{
			A_SpawnItem("ExplosiveFire");
			A_StartSound("fexplode", CHAN_AUTO, CHANF_OVERLAP, 1.0, ATTN_NORM, FRandom(0.3, 1.0));
			A_Explode(0, 0, 0, false, 0, Random(50, 100), 5); // shrapnel (nails)
			A_Quake(Random(4, 8), 35 * Random(4, 8), Random(512, 1024), Random(512, 1024));
			for (user_i = 0; user_i < Random(6, 10); user_i++)
			{
				if (Random(0, 2) == 0)
				{
					A_FaceTarget;
					A_SPosAttackUseAtkSound; // some shrapnel hits the player
				}
				A_SpawnItemEx("Smoke", FRandom(-8, 8), FRandom(-8, 8), 0, FRandom(-0.8, 0.8), FRandom(-0.8, 0.8), FRandom(-0.008, 0.008));
			}
			A_SpawnItem("Scorch");
			for (user_i = 0; user_i < Random(6, 10); user_i++)
			{
				A_SpawnItem("RocketSmokeTrail");
			}
		}
		STOP
	}
}

Actor ExplosiveFire : ArchvileFire
{
	var int user_i;

	+SPRITEFLIP
	
	XScale 1.5
	YScale 0.5
	Alpha 1.0
	States
	{
	Spawn:
		FIRE A 2 BRIGHT A_StartFire
		FIRE BBAABBAABBAABBAA 2 BRIGHT A_FadeTo(0.0, 0.1, FTF_REMOVE)
		STOP
	}
}

Actor Smoke
{
	var int user_i;
	var int user_alpha;

	+NOBLOCKMAP
	+NOCLIP
	+FLOAT
	+NOGRAVITY
	+NOSPRITESHADOW
	+FORCEXYBILLBOARD

	RenderStyle Translucent
	DefaultAlpha
	States
	{
	Spawn:
		SMOK AAAAAAAAAAAAAAAAAAAAAAAA 10
		{
			user_alpha = 100;
			for (user_i = 2; user_i < 25; user_i++)
			{
				A_SetScale(user_i * 0.1);
				A_FadeTo(user_alpha * .001, 0.1);
			}
		}
		SMOK AAA 10 A_FadeTo(0.0, 0.1, FTF_REMOVE)
		STOP
	}
}

Actor Scorch
{
	+FLATSPRITE
	
    Mass 0x7FFFFFFF
	States
	{
	Spawn:
		BURN A -1
		STOP
	}
}
