// *** MODIFIED BY CHEBMASTER
// I mark most important places modified by me with //***Che -- unless I forget to.





actor GenericBurningGuy // used by player only
{   Radius 1
    Height 1
    +NOTELEPORT
    +MOVEWITHSECTOR
	+NOICEDEATH
    Mass 1000
    Health 100
	States    {
		Spawn:
		   TNT1 A 0 BRIGHT
		   BUR2 A 1 BRIGHT
		   BUR2 AABBCCDDEE 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN FFGGHH 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN IIJJKKLL 3 BRIGHT A_CustomMissile ("BurnParticles", 28, 0, random (0, 180), 2, random (0, 180))
		   BURN MMN 3 BRIGHT A_CustomMissile ("BurnParticles", 32, 0, random (0, 180), 2, random (0, 180))
		   BURN NOOPP 3 BRIGHT A_CustomMissile ("BurnParticles", 22, 0, random (0, 180), 2, random (0, 180))
		   BURN QQ 3 BRIGHT A_CustomMissile ("BurnParticles", 18, 0, random (0, 180), 2, random (0, 180))
		   //TNT1 A 0 A_PlaySound("DSFDTHE")
		   BURN RRSSTTSSRRSSTTSSRRSSTTRRSSTTSSRRSSTTSSRRSSTTSSTT 3 BRIGHT A_CustomMissile ("SmallBurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   BURN UU 3 BRIGHT A_CustomMissile ("BurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
		   BURN VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 9 A_CustomMissile ("PlasmaSmoke", 8, 0, random (0, 360), 2, random (90, 110))
		   
		   //***Che: prevent the game engine from auto-respawning this corpse on nightmare
			// *as well* as preventing viles from raising it
			TNT1 A 0 A_ChangeFlag("CORPSE", 0)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BURN V -1


		Spawn2:
		   TNT1 A 0 BRIGHT
		   //TNT1 A 0 A_PlaySound("DSFDTHG")
		   TNT1 A 0 BRIGHT
		   BUR2 A 1 BRIGHT
		   BUR2 AABBCCDDEE 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN FFGGHH 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN IIJJKKLL 3 BRIGHT A_CustomMissile ("BurnParticles", 28, 0, random (0, 180), 2, random (0, 180))
		   BURN MMN 3 BRIGHT A_CustomMissile ("BurnParticles", 32, 0, random (0, 180), 2, random (0, 180))
		   BURN NOOPP 3 BRIGHT A_CustomMissile ("BurnParticles", 22, 0, random (0, 180), 2, random (0, 180))
		   BURN QQ 3 BRIGHT A_CustomMissile ("BurnParticles", 18, 0, random (0, 180), 2, random (0, 180))
		   //TNT1 A 0 A_PlaySound("DSFDTHG")
		   BURN RRSSTTSSRRSSTTSSRRSSTTRRSSTTSSRRSSTTSSRRSSTTSSTT 3 BRIGHT A_CustomMissile ("SmallBurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   BURN UU 3 BRIGHT A_CustomMissile ("BurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
		   BURN VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 9 A_CustomMissile ("PlasmaSmoke", 8, 0, random (0, 360), 2, random (90, 110))
		   
		   //***Che: prevent the game engine from auto-respawning this corpse on nightmare
			// *as well* as preventing viles from raising it
			TNT1 A 0 A_ChangeFlag("CORPSE", 0)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
		   BURN V -1
		   Stop
	}
}


ACTOR BurnParticles
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    Speed 0
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    +NODAMAGETHRUST
    +NOCLIP
    DamageType Fire
	+NOBLOOD
	+NOBLOODDECALS
	+BLOODLESSIMPACT
	-BLOODSPLATTER
    States
    {
		Spawn:
			TNT1 A 0
			XDT3 A 0 A_Explode(3,30)
			TNT1 A 0 A_SpawnItem("RedFlare", 0, 5)
			TTRB A 0 bright A_CustomMissile ("PlasmaSmoke", 20, 0, random (0, 360), 2, random (60, 130))
			TTRB A 0 bright A_CustomMissile ("SmallFireTrail324", 0, 0, random (0, 360), 2, random (0, 130))
			TNT1 A 3
			stop
    }
}

ACTOR SmallBurnParticles: BurnParticles
{
	DamageType Burn
    States
    {
		Spawn:
			TNT1 A 0
			XDT3 A 0 A_Explode(2,30)
			TNT1 A 0 A_SpawnItem("RedFlare", 0, 5)
			TTRB A 0 bright A_CustomMissile ("PlasmaSmoke", 20, 0, random (0, 360), 2, random (60, 130))
			TTRB A 0 bright A_CustomMissile ("SmallFlameTrails", 0, 0, random (0, 360), 2, random (60, 130))
			stop
    }
}


ACTOR BurnParticlesNoDamage: BurnParticles
{
    States
    {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SpawnItem("RedFlare", 0, 5)
			TTRB A 0 bright A_CustomMissile ("PlasmaSmoke", 20, 0, random (0, 360), 2, random (60, 130))
			TTRB A 0 bright A_CustomMissile ("FlameTrails", 0, 0, random (0, 360), 2, random (60, 130))
			stop
    }
}



ACTOR BurnDamageSmall: BurnParticles
{
	+NODAMAGETHRUST
    States
    {
		Spawn:
			TNT1 A 0
			XDT3 A 0 A_Explode(5,60)
			stop
    }
}



ACTOR BurnDamageLarge: BurnParticles
{
	+NODAMAGETHRUST
    States
    {
		Spawn:
			TNT1 A 0
			XDT3 A 0 A_Explode(12,120)
			stop
    }
}




actor BurningZombieOld: AbstractCorpse // never used anywhere
{   Radius 1
    Height 1
    +NOTELEPORT
    +MOVEWITHSECTOR
    Mass 1000
    Health 100
	States    {
		Spawn:
		   TNT1 A 0 BRIGHT
		   TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
		   BUR2 A 1 BRIGHT
		   BUR2 AABBCCDDEE 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN FFGGHH 3 BRIGHT A_CustomMissile ("BurnParticles", 36, 0, random (0, 180), 2, random (0, 180))
		   BURN IIJJKKLL 3 BRIGHT A_CustomMissile ("BurnParticles", 28, 0, random (0, 180), 2, random (0, 180))
		   BURN MMN 3 BRIGHT A_CustomMissile ("BurnParticles", 32, 0, random (0, 180), 2, random (0, 180))
		   BURN NOOPP 3 BRIGHT A_CustomMissile ("BurnParticles", 22, 0, random (0, 180), 2, random (0, 180))
		   BURN QQ 3 BRIGHT A_CustomMissile ("BurnParticles", 18, 0, random (0, 180), 2, random (0, 180))
		   TNT1 A 0 A_PlaySound("BURNZOM")
		   BURN RRSSTTSSRRSSTTSSRRSSTTRRSSTTSSRRSSTTSSRRSSTTSSTT 3 BRIGHT A_CustomMissile ("SmallBurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   BURN UU 3 BRIGHT A_CustomMissile ("BurnParticles", 12, 0, random (0, 180), 2, random (0, 180))
		   BURN VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV 9 A_CustomMissile ("PlasmaSmoke", 8, 0, random (0, 360), 2, random (90, 110))
		   
		   //***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BURN V -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
		   
		   Stop
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2000), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ZombiemanRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 6, 0, 0)//"ZombiemanRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2000) // see _mob_list.xlsx
			Stop
	}
}
	   
	   
	   
	   
	   
	   


actor AbstractBurningShmuck: AbstractCorpse
{
	States {
		Death:
		XDeath:
		Death.SSG:
		Death.Explosive:
			TNT1 A 0 A_NOBlocking
			TNT1 A 0 A_XScream
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
				TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 AAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AAA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAA 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAA 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("MuchMeatDeath", 35, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAA 0 A_CustomMissile ("BurningFlyingMeatPiece", 64, 0, random (0, 360), 2, random (0, 160))
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop			
	}
}



actor DesintegratedHuman // pure decoration used by everyone and their grandmother. Never respawn.
{   Radius 1
    Height 1
    +NOTELEPORT
    +MOVEWITHSECTOR
    Mass 1000
    Health 100
	Scale 0.7
	States    
	{
		Spawn:
	   
			TNT1 AAAAA 0 A_CustomMissile ("Guts", 24, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAA 0 A_CustomMissile ("SuperGoreSpawner", 30, 0, random (0, 360), 2, random (30, 60))
			TNT1 A 0 A_CustomMissile ("BloodSplinter", 0, 0, random (0, 360), 2, random (0, 35))
			TNT1 AA 0 A_CustomMissile ("XDeath2", 0, 0, random (0, 360), 2, random (60, 90))
			TNT1 AA 0 A_CustomMissile ("XDeath3", 0, 0, random (0, 360), 2, random (60, 90))
			TNT1 A 0 A_SpawnItem("SplatteredLarge")
			TNT1 A 0 A_SetAngle(random (0, 360))
			TNT1 A 0 A_SpawnItemEx("SplatteredLarge", 32, 32)
			TNT1 A 0 A_SpawnItemEx("SplatteredLarge", -32, -32)
			TNT1 A 0 A_SpawnItem("BarrelExplosionSmokeColumn")
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece", random (-15, 15), random (-15, 15))
			TNT1 AA 0 A_SpawnItemEx("TinyBurningPiece2", random (-35, 35), random (-35, 35))
			TNT1 AA 0 A_CustomMissile ("BloodmistBig", 56, 0, random (0, 360), 2, random (60, 90))
			TNT1 AAAAA 0 A_CustomMissile ("BloodmistExtraBig", 56, 0, random (0, 360), 2, random (40, 90))
			ID50 ABCDEF 7
			Stop
	}
}
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
actor BurningImp: AbstractBurningShmuck
{   Radius 1
    Height 1
    +NOTELEPORT
    +MOVEWITHSECTOR
	+SHOOTABLE
    Mass 1000
    Health 100
	DamageFactor "Fire", 0.0
	DamageFactor "Flames", 0.0 // flamethrower aoe
	DamageFactor "Burn", 0.0 // imp fireball
	States    {
		Spawn:
			IZD4 CCC 2 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("imp/pain", CHAN_VOICE)
			IZD4 DDD 2 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("imp/pain", CHAN_VOICE)
			IZD4 CCC 3 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("imp/pain", CHAN_VOICE)
			IZD4 DDD 2 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			
			
			TROO LLLL 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
			
		Death:	
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			TNT1 A 0 A_Playsound("props/redfire")
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BOSB FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 2 A_CustomMissile ("FlameTrails", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che detaching smoke emittinf from burned corpses
			// because archvile would otherwise only rez the corpse after it stopped smoking
			TNT1 A 0 A_SpawnItemEx("FBD_CorpseSmoke",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0,0)
			//BOSB FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 20 A_CustomMissile ("SmallSmoke", 25, 0, random (0, 360), 2, random (70, 110))
			
			//***Che: mark it as raiseable for the viles
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BOSB F -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			
			Stop
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2005), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ImpRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 7, 0, 0)//"ImpRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2005) // see _mob_list.xlsx
			Stop
			
		Death:
			BOSB F 0 A_ChangeFlag("SHOOTABLE", 0)
			BOSB F -1 
					
	}
}




actor BurningDemon2: AbstractCorpse
{   
	//***Che
	DamageFactor "FriendlyExplosion", 2.0
	
	Radius 22
    Height 52
    +NOTELEPORT
	+SHOOTABLE
    +MOVEWITHSECTOR
	+SOLID
	+NOBLOCKMONST
	PainChance 0
	Speed 15
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    damagefactor "Shrapnel", 0.3
	damagefactor "Fire", 0.0
	damagefactor "Flames", 0.0
	damagefactor "Burn", 0.0
	damagefactor "SSG", 5.0
	damagefactor "Explosive", 5.0
	//***Che
	damagefactor "Bfg10k", 5.0
	damagefactor "ExplosiveImpact", 2.0
    Mass 1000
    Health 100
	States    {
		Spawn:
			CRB7 M 3 A_Wander
			TNT1 A 0 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			CRB7 N 3 A_Wander
			TNT1 A 0 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			CRB7 O 3 A_Wander
			TNT1 A 0 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			CRB7 P 3 A_Wander
			TNT1 A 0 A_CustomMissile ("BurnParticles", 25, 0, random (0, 360), 2, random (50, 130))
			
			TNT1 A 0 A_playsound ("demon/pain")
			
			TNT1 A 0 A_GiveInventory("DeathTimer1", 1)
			TNT1 A 0 A_JumpIfInventory("DeathTimer1", 7, "GotoDeath")
			Loop
			
		GotoDeath:
			TNT1 A 0
		
			Goto Death
			
		Death:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx ("BurnedDemon",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 30 A_ChangeFlag("SHOOTABLE", 0)
			Stop
		XDeath:
		Death.SSG:
		Death.Explosive:
			TNT1 A 0 A_NOBlocking
			TNT1 A 0 A_XScream
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
				TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedDemonArm", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedDemonLeg", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("MuchMeatDeath", 35, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAA 0 A_CustomMissile ("BurningFlyingMeatPiece", 64, 0, random (0, 360), 2, random (0, 160))
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2009), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("DemonRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 8, 0, 0) //"DemonRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2009) // see _mob_list.xlsx
			Stop
	}
}



Actor BurnedDemon: AbstractCorpse
{
	Radius 20 //***Che otherwise raising failures //1
	Height 12 //***Che otherwise raising failures //1
	+CORPSE
	+THRUACTORS
	+GHOST
	+THRUGHOST
	-SHOOTABLE
	States
	{
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2009), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("DemonRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 8, 0, 0)//"DemonRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2009) // see _mob_list.xlsx
			Stop		
		Spawn:
			CRB7 Q  2
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_Scream
			TNT1 A 0 A_playsound ("demon/death", CHAN_VOICE)
			CRB7 QQQQ 2 A_CustomMissile ("FlameTrails", 45, 0, random (0, 360), 2, random (50, 130))
			CRB7 RRRR 2 A_CustomMissile ("FlameTrails", 30, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Playsound("props/redfire")
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			CARB JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
			
			//***Che detaching smoke emittinf from burned corpses
			// because archvile would otherwise only rez the corpse after it stopped smoking
			TNT1 A 0 A_SpawnItemEx("FBD_CorpseSmoke",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0,0)
			//CARB JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ 20 A_CustomMissile ("SmallSmoke", 35, 0, random (0, 360), 2, random (70, 110))
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			CARB J -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
	}
}









ACTOR DyingZombiemanInFlames: AbstractCorpse
{
    Radius 16 //12
    Height 30
	DeathHeight 12
    Speed 5
	Health 20
	PainSound "grunt/pain"
	DeathSound "grunt/death"
	+SHOOTABLE
    +FLOORCLIP
	//+NOBLOCKMAP
	+NOICEDEATH
    +LOOKALLAROUND
	+FRIGHTENED
	
	//***Che
	+CORPSE
	
	-SOLID
	damagefactor "Burn", 0.0
	damagefactor "Fire", 0.0
	damagefactor "Flames", 0.0
    States
    {
		Spawn:
			TNT1 A 0
			ZMAB A 1 A_Look
			Loop
		See:
			TNT1 A 0
			TNT1 A 0 A_Playsound("BurnZom", CHAN_VOICE)
			Goto See2
		See2:
			ZMAB A 5 A_Chase
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			ZMAB A 5 A_Chase
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			ZMAB B 5 A_Chase
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			ZMAB B 5 A_Chase
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_SpawnItem("Brutal_BloodSpot")
			TNT1 A 0 A_GiveInventory("DeathTimer1", 1)
			TNT1 A 0 A_JumpIfInventory("DeathTimer1", 5, "GotoDeath")
			Loop
		
		//***Che withoutt this he was sometimes caught in an endless loop out of player's sight
		Idle:
			ZMAB A 5 A_Wander
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			ZMAB A 5 A_Wander
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			ZMAB B 5 A_Wander
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			ZMAB B 5 A_Wander
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_SpawnItem("Brutal_BloodSpot")
			TNT1 A 0 A_GiveInventory("DeathTimer1", 1)
			TNT1 A 0 A_JumpIfInventory("DeathTimer1", 5, "GotoDeath")
			Loop			
			
		GotoDeath:
			//***Che
			ZMAB B 1 A_Die
			Wait
			
		Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_Scream
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHH 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			BRZ3 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			 
		Crush:
			TNT1 A 0 A_PlaySound("misc/xdeath4")
			CRS2 A 5
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			CRS2 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		
		Death.Stomp:
		Death.SSG:
		XDeath:
			TNT1 AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AAAAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath2", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 A 0 A_SpawnItem ("CrushedRemains")
			TNT1 A 1 A_StopSound(CHAN_VOICE)
			TNT1 A 1 A_XScream
			TNT1 A 1 A_NoBlocking
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2000), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ZombiemanRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 6, 0, 0) // "ZombiemanRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2000) // see _mob_list.xlsx
			Stop
	}
}



ACTOR DyingSergeantNoLegInFlames: AbstractCorpse
{
    Radius 16 //12
    Height 30
	DeathHeight 12
    Speed 5
	Health 20
	PainSound "grunt/pain"
	DeathSound "grunt/death"
	+SHOOTABLE
    +FLOORCLIP
	//+NOBLOCKMAP
    +LOOKALLAROUND
	+NOICEDEATH
	+FRIGHTENED
	-SOLID
	
	//***Che
	+CORPSE
	
	damagefactor "Burn", 0.0
	damagefactor "Fire", 0.0
	damagefactor "Flames", 0.0
    States
    {

		Spawn:
			TNT1 A 0
			TNT1 A 0 A_Playsound("BurnZom", CHAN_VOICE)
			ZMAB A 1 A_Look
			Loop
		See:
			SMBM A 5 A_Chase
			TNT1 A 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			SMBM A 5 A_Chase
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			SMBM B 5 A_Chase
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			SMBM B 5 A_Chase
			TNT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))

			TNT1 A 0 A_GiveInventory("DeathTimer1", 1)
			TNT1 A 0 A_JumpIfInventory("DeathTimer1", 10, "GotoDeath")
			Loop
			
		GotoDeath:
			TNT1 A 0
			Goto Death
		Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_Scream
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHH 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			
		Crush:
			TNT1 A 0 A_PlaySound("misc/xdeath4")
			CRS2 A 5
			
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			CRS2 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		
		Death.Stomp:
		Death.SSG:
		XDeath:
			TNT1 AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AAAAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath2", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 bright A_CustomMissile ("XDeath3", 55, 0, random (0, 360), 2, random (30, 180))
			TNT1 A 0 A_SpawnItem ("CrushedRemains")
			TNT1 A 1
			TNT1 A 1 A_XScream
			TNT1 A 1 A_NoBlocking
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			CRS2 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
			
		//***Che	
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2001), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ShotgunGuyRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 9, 0, 0) //"ShotgunGuyRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2001) // see _mob_list.xlsx
			Stop
	}
}






ACTOR BurningZombie: AbstractCorpse
{
    Radius 16 //***Che otherwise raising failures //12
    Height 56
    Speed 5
    Scale 0.85
	Health 100
	GibHealth 25
	damagefactor "Burn", 0.0
	damagefactor "Fire", 0.0
	damagefactor "Flames", 0.0
	damagefactor "Flame", 0.0
	damagefactor "Head", 0.0
	damagefactor "ExplosiveImpact", 10.0
	//***Che
	damagefactor "Bfg10k", 10.0
	MONSTER
	-COUNTKILL
	+NOICEDEATH
	+FRIENDLY
    +FLOORCLIP
	+SHOOTABLE
	+NOBLOCKMONST
	+DONTSPLASH
	+NOTARGET
	Gravity 0.7
	bloodtype "DeadBlood"
    Obituary "%o was near someone in flames."
	MaxDropOffHeight 6000
	
	+CORPSE
   
	Mass 999999
    States
    {
		Spawn:
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			BDT1 AAA 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-2)
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 BBB 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-2)
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 CCC 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-2)
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 DDD 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-2)
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 5, "Death")
			//TNT1 A 0 A_JumpIf(momz < 5, "Falling")
			Loop
		Falling:	
			BDT2 AA 1 Bright
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT2 BB 1 Bright
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT2 CC 1 Bright
			TNT1 A 0 A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BDT2 DD 1 Bright
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_JumpIf(momz == 0, "fallDeath")
			Loop
		
		Death.FriendlyExplosion:
		Death.ExplosiveImpact:
			TNT1 A 0
			TNT1 A 0 ThrustThingZ(0,60,0,1)
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			Goto Looping
		
		Looping:	
			BDT3 AAAA 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 BBBB 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 CCCC 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 DDDD 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			Loop	
		
		FallDeath:
			TNT1 AAAAAAAAAA 0 A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("ExplosionParticleHeavy", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 AAAA 0 A_CustomMissile("XDeath1", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 A 0 A_PlaySound("misc/xdeath")
			TNT1 A 0 A_Explode(100, 128)
			Goto Death
		Death:
			TNT1 A 0
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_Jump(128, "Death2")
			BDT1 EEFFGGHHiijjkkLLmm 3 Bright A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			NJEX AAAAAAAAAAAAAAAAAA 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			NJEX AAAAAAAAAAAAAAAAAA 10 Bright A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			NJEX A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		Death2:
			BDT1 EEFFGGHHiijjkkLLmm 3 Bright A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			NJEX BBBBBBBBBBBBBBBBBB 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			NJEX BBBBBBBBBBBBBBBBBB 10 Bright A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			NJEX B -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		XDEATH:
		DEATH.SSG:
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_PlaySound("misc/xdeath", CHAN_VOICE)
				 TNT1 AA 0 A_CustomMissile ("XDeathBurnedArm", 32, 0, random (0, 360), 2, random (0, 160))
				TNT1 AA 0 A_CustomMissile ("XDeathBurnedLeg", 32, 0, random (0, 360), 2, random (0, 160))
				TNT1 A 0 A_CustomMissile ("XDeathBurnedSkull", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("MuchMeatDeath", 35, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAA 0 A_CustomMissile ("BurningFlyingMeatPiece", 64, 0, random (0, 360), 2, random (0, 160))
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			
			Stop
			
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2000), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ZombiemanRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 6, 0, 0) // "ZombiemanRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2000) // see _mob_list.xlsx
			Stop
    }
}


ACTOR BurningCacodemon: AbstractCorpse
{
    Radius 24 //***Che otherwise raising failures //12
    Height 56
    Speed 3
    Scale 0.85
	Health 100
	GibHealth 25
	+NOICEDEATH
	damagefactor "Burn", 0.5
	damagefactor "Fire", 0.5
	damagefactor "Flames", 0.5
	damagefactor "Flame", 0.5
	damagefactor "ExplosiveImpact", 10.0
	//***Che
	damagefactor "Bfg10k", 10.0
	bloodtype "Blue_Blood"
	bloodcolor DarkBlue
	MONSTER
	-COUNTKILL
	+FLOAT
	+NOGRAVITY
	+FRIENDLY
    +FLOORCLIP
	+SHOOTABLE
	+NOBLOCKMONST
	+DONTSPLASH
	Gravity 1.0
	bloodtype "DeadBlood"
    Obituary "%o was near someone in flames."
	Mass 100
    States
    {
		Spawn:
			TNT1 A 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			HEAD NN 1 Bright A_Chase("", "")
			Goto Suffer
		Suffer:
			HEAD EE 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-1)
			
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("FireballExplosionFlamesBig", 40, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			
			
			HEAD EE 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			HEAD B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 7, "Death")
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			Loop

		Death:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			HEAD P 1 A_SpawnItem("100SmallFireFocusSpawnerz")
			TNT1 A 0 A_Playsound("props/redfire")
			HEAD PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 12 A_CustomMissile("FireballExplosionFlamesBig", 15, 0, random (0, 360), 2, random (50, 130))
			HEAD P 1 A_SpawnItem("100SmallFireFocusSpawnerz")
			HEAD PPPPPPPPPPPPPPPPPPPPPPPP 6 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			HEAD P -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2011), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("CacodemonRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 10, 0, 0) //"CacodemonRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2011) // see _mob_list.xlsx
			Stop
		OnRezSfx:
			// knight, baron, duke, belphegor and cacodemon corpses must replace this method with one that has appropriate blood color
			TNT1 AAA 3 A_CustomMissile ("BlueBloodMistBig", 20, 0, random (0, 360), 2, random (30, 90))
			TNT1 AAAA 3 A_CustomMissile ("BlueBloodMist", 20, 0, random (0, 360), 2, random (30, 90))
			TNT1 AAAAA 3 A_CustomMissile ("BlueBloodMistSmall", 20, 0, random (0, 360), 2, random (30, 90))
			TNT1 A 30
			Stop	
    }
}

ACTOR BurningCaclet: BurningCacodemon
{
	Radius 12
	Height 28
	Speed 6
	Scale 0.8
	Translation "250:254=0:0", "4:4=0:0", "16:21=0:0", "37:47=0:0", "16:36=0:0", "168:191=0:0", "232:235=160:164", "128:143=0:0", "144:151=161:167", "5:8=0:0", "48:79=160:167", "80:111=5:8", "192:197=0:0"
	States
	{
		Spawn:
			WATC E 1 BRIGHT NODELAY A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Playsound("props/redfire", CHAN_7)
			WATC EE 1 Bright A_Chase("", "")
			Goto Suffer
		Suffer:
			WATC EE 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-1)
			
			TNT1 A 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("FireballExplosionFlames", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			
			
			WATC EE 1 Bright A_Wander
			TNT1 A 0 A_Recoil(-1)
			TNT1 A 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile("ExplosionParticleVerySlow", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 7, "Death")
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			Loop

		Death:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			WATC D 1 A_SpawnItem("100SmallFireFocusSpawnerz")
			TNT1 A 0 A_Playsound("props/redfire")
			KYCA WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 12 A_CustomMissile("FireballExplosionFlames", 15, 0, random (0, 360), 2, random (50, 130))
			KYCA W 1 A_SpawnItem("100SmallFireFocusSpawnerz")
			TNT1 A 0 ACS_NamedExecuteWithResult("BurnedCorpseSmoke") 

			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			KYCA W -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2010), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("CacletRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 27, 0, 0) // "CacletRaisedByVile
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2010) // see _mob_list.xlsx
			Stop
		OnRezSfx:
			// knight, baron, duke, belphegor and cacodemon corpses must replace this method with one that has appropriate blood color
			TNT1 AAAAA 3 A_CustomMissile ("BlueBloodMist", 20, 0, random (0, 360), 2, random (30, 90))
			TNT1 AAAAAAA 3 A_CustomMissile ("BlueBloodMistSmall", 20, 0, random (0, 360), 2, random (30, 90))
			TNT1 A 30
			Stop
	}
}






































ACTOR BurningZombieMan: AbstractCorpse
{
    Radius 16 //***Che otherwise raising failures //8
    Height 48
    Speed 3
	Health 30
	GibHealth 25
	damagefactor "Burn", 0.0
	damagefactor "Fire", 0.0
	damagefactor "Flames", 0.0
	damagefactor "Flame", 0.0
	damagefactor "Head", 0.0
	damagefactor "Ice", 0.0
	damagefactor "ExplosiveImpact", 10.0
	//***Che
	damagefactor "Bfg10k", 10.0
	MONSTER
	-COUNTKILL
	+FRIENDLY
    +FLOORCLIP
	+SHOOTABLE
	+NOBLOCKMONST
	+NOTARGET
	Gravity 0.7
	bloodtype "DeadBlood"
    Obituary "%o was near someone in flames."
	MaxDropOffHeight 6000
   
	Mass 999999
    States
    {
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2000), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ZombiemanRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 6, 0, 0) // "ZombiemanRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2000) // see _mob_list.xlsx
			Stop
		Spawn:
			BRZ1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			BRZ3 AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 4, "Death")
			Loop
		
		Death.FriendlyExplosion:
		Death.ExplosiveImpact:
			TNT1 A 0
			TNT1 A 0 ThrustThingZ(0,60,0,1)
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			TNT1 A 0
			Goto Looping
		
		Looping:	
			BDT3 AAAA 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 BBBB 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 CCCC 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT3 DDDD 1 Bright A_JumpIf(momz == 0, "fallDeath")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			Loop	
		
		FallDeath:
			TNT1 AAAAAAAAAA 0 A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("ExplosionParticleHeavy", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 AAAA 0 A_CustomMissile("XDeath1", 10, 0, random (0, 360), 2, random (20, 150))
			TNT1 A 0 A_PlaySound("misc/xdeath", CHAN_BODY)
			TNT1 A 0 A_Explode(100, 128)
			Goto Death
		Death:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			
			TNT1 A 0 A_Jump(256, "Death1", "Death2", "Death3")
			Goto Death1
			
		Death1:	
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHH 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		Death2:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BRZ3 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 IIIIIIIIIIIIIIIII 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 I -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
			
		Death3:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			
			
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			
			// this one takes up the respawning/raising torch:
			TNT1 A 0 A_SpawnItemEx ("DyingZombiemanInFlames",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 30 A_ChangeFlag("CORPSE", 0) // give scripts and actors time to access us
			Stop
			
		XDEATH:
		DEATH.SSG:
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_PlaySound("misc/xdeath", CHAN_VOICE)
				 TNT1 AA 0 A_CustomMissile ("XDeathBurnedArm", 32, 0, random (0, 360), 2, random (0, 160))
				TNT1 AA 0 A_CustomMissile ("XDeathBurnedLeg", 32, 0, random (0, 360), 2, random (0, 160))
				TNT1 A 0 A_CustomMissile ("XDeathBurnedSkull", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("MuchMeatDeath", 35, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAA 0 A_CustomMissile ("BurningFlyingMeatPiece", 64, 0, random (0, 360), 2, random (0, 160))
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
    }
}


ACTOR BurningShotgunguy: BurningZombieMan
{
    States
    {
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2001), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ShotgunGuyRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 9, 0, 0) //"ShotgunGuyRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2001) // see _mob_list.xlsx
			Stop
		Spawn:
			BRZ1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			BRZ3 AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ3 BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 4, "Death")
			Loop
		
		
		Death:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			
			TNT1 A 0 A_Jump(256, "Death1", "Death2", "Death3")
			Goto Death1
			
		Death1:	
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHH 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		Death2:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BRZ3 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 IIIIIIIIIIIIIIIII 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 I -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
			
		Death3:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			BRZ3 DD 3 A_CustomMissile("BurnParticles", 30, 0, random (0, 360), 2, random (50, 130))
			BRZ3 EE 3 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 FF 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_Wander
			BRZ3 GG 3 Bright A_CustomMissile("BurnParticles", 10, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			
			TNT1 A 0 A_SpawnItemEx("DyingSergeantNoLegInFlames",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0)
			
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 30 A_ChangeFlag("CORPSE", 0)
			Stop
    }
}







ACTOR BurningcHAINGUNGUY: BurningZombieMan
{
    States
    {
		
		//***Che
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2002), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("ChaingunGuyRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 11, 0, 0) //"ChaingunGuyRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2002) // see _mob_list.xlsx
			Stop
		
		Spawn:
			BRZ1 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			CPBR AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			CPBR BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			CPBR CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			CPBR BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 5, "Death")
			
			Loop

		Death:	
			TNT1 A 0
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 3 A_CustomMissile("BurnParticles", 5, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			BRZ3 HHHHHHHHHHHHHHHHHHHHHHHH 10 A_CustomMissile("PlasmaSmoke", 15, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this on nightmare as a burning screaming monster. 
			//Archviles do not care about the ISMONSTER flag, they only check for CORPSE
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			BRZ3 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
    }
}




ACTOR BurningImpRunning: BurningZombieMan
{
    States
    {
		Raise:
			Stop // no raising, this is a transient actor
		Spawn:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			TRBR AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			TNT1 A 0 A_PlaySound("imp/pain")
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TRBR BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TRBR CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TRBR DDD 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 4, "Death")
			Loop
		Death:
		Death.ExplosiveImpact:
		Death.FriendlyExplosion:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			//TNT1 A 0 A_SpawnItem("BurningImp")
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			TNT1 A 0 A_SpawnItemEx("BurningImp",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0)
			TNT1 A 30 A_ChangeFlag("CORPSE", 0)
			Stop
    }
}



ACTOR BurningLabguy: BurningZombieman { //***Che added this class so that burned labguys stop respawning as zombiemen
	States
	{
		Death:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_Playsound("props/redfire", CHAN_VOICE)
			BRZ3 DDEE 3 BRIGHT A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			PBR1 DEFGH 3 BRIGHT A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			PBR1 H -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop		
		Death.ExplosiveImpact:
		Death.FriendlyExplosion:
		Death.SSG:
		Death:Bfg10k:
			TNT1 A 0 A_Fall
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
			TNT1 A 0 A_ChangeFlag("NOTARGET", 1)
			TNT1 A 0 A_StopSound(CHAN_VOICE)
			TNT1 A 0 A_SpawnItemEx("CharredMeatsplosion",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SpawnItem("100SmallFireFocusSpawnerz")
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2003), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("LabguyRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 17, 0, 0) //"LabguyRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2003) // see _mob_list.xlsx
			Stop				

	}
}



ACTOR BurningDemon: BurningZombieMan
{
    States
    {
		
		Raise:
			// note: the frame letter of the "----" (keep previous) sprite is ignored
			"----" A 0
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_NoBlocking // the raising code deep in C++ makes it solid
			"----" A 0 A_JumpIf(!CallAcs("EnoughSpaceToRezNormally", 2090), "FallbackRaise")
			// The vile had already copied his friendliness and target to this corpse.
			// A_SpawnItem(Ex) automatically copy friendliness
			//   and target, but only if both the spawner and the spawnee are monsters.
			"----" A 0 A_ChangeFlag("COUNTKILL", 0)
			"----" A 0 A_ChangeFlag("ISMONSTER", 1)
			"----" A 0 A_SpawnItemEx ("DemonRaisedByVile",0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS | SXF_NOCHECKPOSITION)
			"----" A 1 A_Jump(256, "OnRezSfx")
			Wait //Zandronum client repeats the last frame while it waits for a status update from the server
			
		FallbackRaise:
			"----" A 0 A_GiveInventory("RezzingNow")
			"----" A 0 A_ChangeFlag("CORPSE", 0)
			"----" A 0 A_ChangeFlag("SHOOTABLE", 0)
			//"----" A -1 ACS_NamedExecuteAlways("FallbackRez", 0, 8, 0, 0) //"DemonRaisedByVile"
			"----" A -1 ACS_NamedExecuteWithResult("FallbackRezMkII", 2009) // see _mob_list.xlsx
			Stop
		Spawn:
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			SBRG AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			TNT1 A 0 A_playsound ("demon/pain", CHAN_VOICE)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			SBRG BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			SBRG CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			SBRG DDD 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 7, "Death")
			Loop
		Death:
			TNT1 A 0 A_SpawnItemEx ("BurnedDemon",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 30 A_ChangeFlag("CORPSE", 0)
			Stop
			
		XDeath:
		Death.SSG:
		Death.Explosive:
		Death.ExplosiveImpact:
		Death.FriendlyExplosion:
			TNT1 A 0 A_NOBlocking
			TNT1 A 0 A_Xscream
			TNT1 AAAAAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedDemonArm", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedDemonLeg", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("MuchMeatDeath", 35, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAA 0 A_CustomMissile ("BurningFlyingMeatPiece", 64, 0, random (0, 360), 2, random (0, 160))
			//TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0,0,0, random (-1, 1),random (-1, 1),8, 0, SXF_ABSOLUTEVELOCITY | SXF_NOCHECKPOSITION) //A_SpawnItem ("CrueltyBonus5Health")
			TNT1 A 0 ACS_NamedExecuteAlways("DropFatalityBonuses", 0, 5, 0, 0) // 0, health, armor, 0 -- rounded down to nearest 2
			
			//***Che: prevent the game engine from auto-respawning this gibbed corpse on nightmare as a corpse
			// while allowiing archviles raising it (they only check for the CORPSE flag)
			// and respawning via script on nightmare
			TNT1 A 0 A_ChangeFlag("CORPSE", 1)
			TNT1 A 0 A_ChangeFlag("ISMONSTER", 0)
			TNT1 A -1 ACS_NamedExecuteAlways("RespawnCorpseAfter60sIfNightmare", 0, 0, 0, 0)
			Stop
    }
}









//***Che The BRZ5* sprite frames are missing from *all* BD versions known to me, beginning with BD 15.
//Commenting this class out.
/*
ACTOR BurningZombieManSimple: BurningZombieMan // never used anywhere
{
    Speed 1
	States
    {
		Spawn:
			BRZ5 B 0 A_CustomMissile("BurnParticles", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_PlaySound("BURNZOM", CHAN_VOICE)
			Goto Suffer
		Suffer:
			BRZ5 AAA 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ5 BBB 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ5 CCC 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ5 DDD 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			 BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ5 EEE 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			 BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			BRZ5 FFF 1 BRIGHT A_Wander
			TNT1 A 0 A_Recoil(-1)
			BDT1 B 0 A_CustomMissile("BurnParticles", 20, 0, random (0, 360), 2, random (50, 130))
			BDT1 B 0 A_CustomMissile("ExplosionParticleVerySlow", 40, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_GiveInventory("PoorGuyBurningLife", 1)
			TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
			TNT1 A 0 A_JumpIfInventory("PoorGuyBurningLife", 4, "Death")
			Loop
	}
}
*/




ACTOR XDeathBurnedLeg
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB E 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB E -1
			Stop
    }
}

ACTOR XDeathBurnedImpLeg
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB F 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB F -1
			Stop
    }
}

ACTOR XDeathBurnedSkull
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			BURN B 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			BURN B 1
			BURN B -1
			Stop
    }
}

ACTOR XDeathBurnedArm
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB D 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB D -1
			Stop
    }
}


ACTOR XDeathBurnedImpArm
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB G 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB G -1
			Stop
    }
}

ACTOR XDeathBurnedDemonArm
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB H 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB H -1
			Stop
    }
}

ACTOR XDeathBurnedDemonLeg
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB I 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB I -1
			Stop
    }
}

ACTOR XDeathBurnedMeat
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB A 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB A -1
			Stop
    }
}

ACTOR XDeathBurnedMeat2
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB B 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB B -1
			Stop
    }
}

ACTOR XDeathBurnedMeat3
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CARB C 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CARB CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 14 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			CARB C -1
			Stop
    }
}

ACTOR XDeathBurnedBlueMeat1
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CACB P 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CACB PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 15 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			BURN D -1
			Stop
    }
}

ACTOR XDeathBurnedBlueMeat2
{
    Radius 8
    Height 8
    Speed 5
	Mass 6
	BounceFactor 0.5
	+DOOMBOUNCE
    +NOBLOCKMAP
	+MISSILE
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
    States
    {
		Spawn:
			CACB Q 10 A_CustomMissile("PlasmaSmoke",0,0,180,2)
			Loop
		Death:
			CACB QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ 15 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
			BURN D -1
			Stop
    }
}




ACTOR Ashes1: XDeath1
{
    Speed 5
	Gravity 0.2
    DeathSound None //"none" //***Che you pass the keyword None without quotes, otherwise it's an unknown sound and extra parser error message
	SeeSound None //"none"
	+DOOMBOUNCE
	+DONTSPLASH
	BounceFactor 0.01
	Decal none
    Scale 1.0
    States
    {
		Spawn:
			ASHZ ABCB 3
			Loop
		Death:
			ASHZ B 400
			Stop
		Splash:
			TNT1 A 0
			TNT1 A 0
			Stop
    }
}


ACTOR Ashes2: XDeath1
{
    Speed 5
	Gravity 0.2
	+DONTSPLASH
    DeathSound None
	SeeSound None
	Decal none
    Scale 1.0
    States
    {
		Spawn:
			ASHY ABCB 3
			Loop
		Death:
			ASHY B 400
			Stop
		Splash:
			TNT1 A 0
			TNT1 A 0
			Stop
    }
}
