ACTOR RealSmallBrainPiece Replaces SmallBrainPiece
{
    Radius 2
    Height 2
	Speed 8
	Mass 1
	Scale 0.5
	Decal BrutalBloodSuper//BrutalBloodSplat
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
	+THRUGHOST
	+CLIENTSIDEONLY
    +DONTSPLASH
    +MOVEWITHSECTOR
	-DONTSPLASH
	+FORCEXYBILLBOARD
	+FLOORCLIP
    States
    {
	Spawn:
	TNT1 A 0

	TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_Jump(32, "DoNothing")
	//XDB5 ABCDEFGH 1
	TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
	Goto See
    See:
		XDB5 ABCDEFGH 3
		Loop
	Death:
		TNT1 A 0
	    TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	    TNT1 A 0 A_CheckFloor("Rest")
	   // TNT1 A 0 A_SpawnItem("DetectCeilBrain")
	    TNT1 A 2
		Stop
	
	Rest:
	TNT1 A 0
	TNT1 A 0 A_Jump(255, "Rest1", "Rest2")
	Rest1:
		XDB5 I 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	Rest2:
		XDB5 I 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop

	DoNothing:
	TNT1 A 0
	Stop
    }
}

ACTOR RealBrains1 Replaces Brains1
{
    Radius 2
    Height 2
	Speed 6
	Mass 1
	BounceFactor 0.2
	Decal BrutalBloodSuper
	Scale 0.8
	+DOOMBOUNCE
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
	+CLIENTSIDEONLY
    +DONTSPLASH
    +MOVEWITHSECTOR
	+FLOORCLIP
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2")
		Loop
		
	Spawn1:
    TNT1 A 0
	XDB6 I -1 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Spawn2:
	TNT1 A 0
	XDB6 ABCDEFGH 3
	Loop

	Death:
	    //XDB6 I 1
		TNT1 AAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_Jump(255, "LastDeath1", "LastDeath2")
		Loop
		
	LastDeath1:
        XDB6 I 800 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	LastDeath2:
		XDB6 I 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	DoNothing:
	TNT1 A 0
	Stop	
		
    }
}

ACTOR 2RealBrains3
{
    Radius 2
    Height 2
	Speed 6
	Mass 1
    Decal BrutalBloodSuper
    +CLIENTSIDEONLY
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
	+FORCEXYBILLBOARD
	Scale 0.45
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		TNT1 A 0 A_FaceTarget
		BRIB EFGH 4 //A_CustomMissile ("BloodTr255", 0, 0, random (0, 360), 2, random (0, 360))
		Goto Death
	Death:
	    BRIB E 1
		TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	    Goto Rest
		
	Rest:
		TNT1 A 0
		TNT1 A 0 A_Jump(255, "Rest1", "Rest2", "Rest3", "Rest4","Rest5")
	Rest1:
        BRIB E 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	Rest2:
		BRIB F 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	Rest3:
        BRIB G 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	Rest4:
		BRIB H 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	Rest5:
		BRIB Y 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	DoNothing:
	TNT1 A 0
	Stop	
    }
}

ACTOR RealBrains3 Replaces Brains3 // Eye
{
    Radius 2
    Height 2
	Speed 6
	Mass 1
    Decal BrutalBloodSuper
    +CLIENTSIDEONLY
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
    +DONTSPLASH
    +MOVEWITHSECTOR
	+FORCEXYBILLBOARD
	Scale 0.45
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		TNT1 A 0 A_FaceTarget
		TNT1 AA 0 A_SpawnItemEx(2RealBrains3,random(-56,56),random(-3,3),random(-0.666,0.666),random(-3,3)*velx,random(-1,1)*vely,random(-0.333,0.333)*velz,0,SXF_NOCHECKPOSITION)
		//BRIB EFGH 4 //A_CustomMissile ("BloodTr255", 0, 0, random (0, 360), 2, random (0, 360))
		Goto Death
	Death:
	    //NULL A 1
		TNT1 A 0 
	    Stop //Goto Rest
		
	/*Rest:
		TNT1 A 0
		TNT1 A 0 A_Jump(255, "Rest1", "Rest2", "Rest3", "Rest4","Rest5")
	Rest1:
        NULL A 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	Rest2:
		NULL A 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	Rest3:
        NULL A 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
		
	Rest4:
		NULL A 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	Rest5:
	
		NULL A 800
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DoNothing")
        Loop
	DoNothing:
	TNT1 A 0
	Stop*/	
    }
}

ACTOR RealXDeath2: XDeath1 Replaces XDeath2
{
    +CLIENTSIDEONLY
    Speed 10
	Gravity 0.4
    DeathSound "misc/xdeath2"
	Decal BrutalBloodSuper
    Scale 1.1
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        XME1 ABCD 3 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
        Loop
    Death:
        TNT1 AAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 180), 2, random (0, 180))
        
		
	    TNT1 A 0 A_CheckFloor("SpawnFloor")
		TNT1 A 0 A_SpawnItemEx ("DetectCeilBloodSimplerLarge",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("DetectCeilXDeath2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		Stop
		
	SpawnFloor:
	    XME1 E 1
		TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
		XME1 E 3
		TNT1 A 0 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
    Living:
	    XME1 E 600
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "Vanish")
		Loop
	Vanish:
	    TNT1 A 5
		Stop
    }
}


ACTOR RealXDeath3: RealXDeath2 Replaces Xdeath3
{
    SeeSound "misc/xdeath4"
    DeathSound "misc/xdeath3"
	Decal BrutalBloodSuper
	Scale 1.1
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        XME2 ABCD 3 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
        Loop
    Death:
        TNT1 AAAAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail5", 0, 0, random (0, 180), 2, random (0, 180))
	    TNT1 A 0 A_CheckFloor("SpawnFloor")
		TNT1 A 0 A_SpawnItemEx ("DetectCeilBloodSimplerLarge",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("DetectCeilXDeath3",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		Stop
		
	SpawnFloor:
	    XME2 E 1
		TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
		XME2 E 3
		TNT1 A 0 A_SpawnItem ("Brutal_BloodSpot", 0, 1)
        Living:
	    XME2 E 600
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "Vanish")
		Loop
	Vanish:
	    TNT1 A 5
		Stop	
    }
}

