/////////////////////////////////////////
// HERETIC FIRE DECORATIONS - DAMAGING //
/////////////////////////////////////////

ACTOR FlareWallTorch : WallTorch replaces Walltorch 
{
  Radius 6
  Height 16
  +NOGRAVITY
  +FIXMAPTHINGPOS
  States
  {
  Spawn:
	TNT1 A 0 
	TNT1 A 0 A_LoopActiveSound
	TNT1 A 0 A_SpawnItem("FireHeatS",0,62)
    TNT1 A 0 A_SpawnItemEx("SmallRedFlare", 0, 0, 62, 0, 0, 0, 0, 176)
    TORC A 1 BRIGHT A_SpawnItemEx("SHRedTorchFireSmall", Random(-2, 2), Random(-2, 2), 62, (0.001)*Random(10, 400), (0.001)*Random(10, 400), (0.001)*Random(1500, 3000), 0, 128)
    Loop
  }
}


ACTOR FlareSerpentTorch : SerpentTorch replaces SerpentTorch
{
  Game Heretic
  Radius 12
  Height 54
  +SOLID
  States
  {
  Spawn:
    TNT1 A 0 
	TNT1 A 0 A_LoopActiveSound
	TNT1 A 0 A_SpawnItem("FireHeatS",0,54)
    TNT1 A 0 A_SpawnItemEx("SmallRedFlare", 0, 0, 55, 0, 0, 0, 0, 176)
    SRTC A 1 BRIGHT A_SpawnItemEx("SHRedTorchFireSmall", Random(-2, 2), Random(-2, 2), 55, (0.001)*Random(10, 400), (0.001)*Random(10, 400), (0.001)*Random(1500, 3000), 0, 128)
    Loop
  }
}


ACTOR FlareFireBrazier : FireBrazier replaces FireBrazier
{
  Game Heretic
  Radius 16
  Height 40
  +SOLID
  ActiveSound "BRAZIER/ACTIVE"
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 0 
	TNT1 A 0 A_LoopActiveSound
	TNT1 A 0 A_SpawnItem("FireHeatL",0,54)
    TNT1 A 0 A_SpawnItemEx("LargeRedFlare", 0, 0, 54, 0, 0, 0, 0, 176)
    BRAZ A 1 BRIGHT A_SpawnItemEx("SHRedTorchFireLarge", Random(-4, 4), Random(-4, 4), 54, (0.001)*Random(10, 400), (0.001)*Random(10, 400), (0.001)*Random(1500, 3000), 0, 128)
    Loop
  }
}

/*

Not until Skulltag gets proper SwitchableDecoration handling :'( 
[MIKK]

ACTOR FlareFireBrazier : SwitchableDecoration Replaces FireBrazier 10101
{
  Radius 16
  Height 40
  +SOLID
  +USESPECIAL 
  Activation "THINGSPEC_Switch"
  ActiveSound "BRAZIER/ACTIVE"
  States
  {
  Active:
    BRAZ A 0 Bright A_PlaySound("Brazier/Ignite")
  Spawn:
    TNT1 A 0 A_LoopActiveSound
    TNT1 A 0 A_SpawnItemEx("LargeRedFlare", 0, 0, 48, 0, 0, 0, 0, 176)
    BRAZ A 1 A_SpawnItemEx("SHRedTorchFireLarge", Random(-4, 4), Random(-4, 4), 42, (0.001)*Random(10, 400), (0.001)*Random(10, 400), (0.001)*Random(1500, 3000), 0, 128)
    Goto Spawn
  Inactive:
    BRAZ A 0 
    BRAZ A 1 A_StopSound(CHAN_AUTO)
    loop
  }
}
*/

Actor SHRedTorchFireSmall
{
  -NoGravity
  +NoInteraction
  +NoBlockmap
  +NoTeleport
  +ForceXYBillboard
  +CLIENTSIDEONLY
  Radius 0
  Height 0
  RenderStyle Add
  Alpha 0.7
  Scale 0.175
  States
  {
  Spawn:
    FIR1 A 0
    FIR1 A 0 A_Jump(128, "Spawn2")
    FIR1 ABCDEFG 1 Bright
    FIR1 HIJKL 1 Bright A_FadeOut(0.15)
    Stop
  Spawn2:
    FIR2 ABCDEFG 1 Bright
    FIR2 HIJKL 1 Bright A_FadeOut(0.15)
    Stop
  }
}

Actor SHRedTorchFireLarge : SHRedTorchFireSmall
{
  Scale 0.30
}

Actor SHRedTorchFireSmaller : SHRedTorchFireSmall
{
  Scale 0.1
}

ACTOR SmallRedFlare : Baseflare
{
   Scale 0.4
   damagetype "fire"
   +DONTSPLASH 
   +NOCLIP
   +NOBLOCKMAP 
   States
   {
   Spawn:
	GLIT A 0 
	GLIT A 1 BRIGHT
	Stop
   }
}

ACTOR SmallerRedFlare : Baseflare
{
   Scale 0.2
   damagetype "fire"
   +DONTSPLASH 
   +NOCLIP
   +NOBLOCKMAP 
   States
   {
   Spawn:
	GLIT A 0 
	GLIT A 1 BRIGHT
	Stop
   }
}

ACTOR LargeRedFlare : Baseflare
{
   Scale 0.7
   damagetype "fire"
   +DONTSPLASH 
   +NOCLIP
   +NOBLOCKMAP 
   States
   {
   Spawn:
   Death:
	GLIT A 0 
	GLIT A 1 BRIGHT
	Stop
   }
}

ACTOR FireHeatS
{ 
   Radius 0
   Height 0
   +GHOST
   +NOCLIP
   +THRUGHOST
   +NOGRAVITY
   +NOBLOCKMAP
   +DONTSPLASH
   damagetype "fire"
   Obituary "%o caught alight"
   States
   {
   Spawn:
	TNT1 A 0
	TNT1 A 1 A_Explode(1,12)  
	TNT1 A 1 A_Explode(1,12)  
	stop
   }
}

ACTOR FireHeatL
{ 
   Radius 0
   Height 0
   +GHOST
   +NOCLIP
   +THRUGHOST
   +NOGRAVITY
   +NOBLOCKMAP
   +DONTSPLASH
   damagetype "fire"
   Obituary "%o was burned to a crisp"
   States
   {
   Spawn:
	TNT1 A 0
	TNT1 A 1 A_Explode(3,16)  
	TNT1 A 1 A_Explode(3,16)  
	stop
   }
}