Actor BulletTracer : FastProjectile
{
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+NOTELEPORT
+BLOODLESSIMPACT
+THRUGHOST
alpha .75
renderstyle add
damage 0
speed 120
radius 4
height 4
seesound ""
deathsound ""
states
	{
	Spawn:
		PUFF A 1 bright A_JumpIfCloser(192,2)
		TNT1 A 0 A_FadeOut(0.1)
		loop
		PUFF A 30 bright A_PlaySound("weapons/tracerwhizz",1,1.0,0,8)
		loop
	XDeath:
		TNT1 A 0
		stop
	Death:
		//TNT1 A 0 A_Jump(210,"Null")
		TNT1 A 0 A_SpawnProjectile("RicochetBullet",0,0,random(0,360),2,random(-40,40))
		stop
	}
}

Actor RicochetBullet //: FastProjectile
{
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+FORCEXYBILLBOARD
+THRUACTORS
bouncetype "Hexen"
mass 1
damage 0
radius 1
height 1
speed 30
seesound ""
renderstyle Add
alpha 0.8
//MissileType BulletTrail
//MissileHeight 8
states
	{
	Spawn:
		TNT1 A 0 NoDelay A_JumpIf(GetCVAR("bdoom_sparks")==0,2)
		TNT1 A 0 A_PlaySound("weapons/ricochet")
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart", 0, 0, random(0, 180), 2, 0)
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart", 0, 0, 0, 2, 0)
		PUFF A 2
		stop
	}
}


actor RP_Puffpart
{
PROJECTILE
radius 1
height 1
renderstyle add
alpha 0.96
damage 0
speed 6
gravity 0.4
-nogravity
-noclip
States
	{
	Spawn:
		EMPT AABBCCCCCCCC 1 BRIGHT A_FadeOut(0.05)
		Stop
	}
}

actor BigRocket : Rocket replaces Rocket
{

  states
  {
  Death:

    MISL B 0 A_Quake(4,12,0,400)
    MISL B 0 A_Quake(2,12,0,800)
    MISL B 8 Bright A_Explode
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  }
}

actor ShotgunChecker : Ammo
{
Inventory.Amount 1
Inventory.MaxAmount 1
Inventory.Icon "TNT1A0"
States
	{
	Spawn:
	  TNT1 A -1
	Loop
	}
}

actor SuperShotgunChecker : Ammo
{
Inventory.Amount 1
Inventory.MaxAmount 1
Inventory.Icon "TNT1A0"
States
	{
	Spawn:
	  TNT1 A -1
	Loop
	}
}


ACTOR DoomPlayerFixed : DoomPlayer
{
  Player.WeaponSlot 1, FistFixed, ChainsawFixed
  Player.WeaponSlot 2, PistolFixed
  Player.WeaponSlot 3, ShotgunFixed, SuperShotgunFixed
  Player.WeaponSlot 4, ChaingunFixed
  Player.WeaponSlot 5, RocketLauncherFixed
  Player.WeaponSlot 6, PlasmaRifleFixed
  Player.WeaponSlot 7, BFG9000Fixed
  
  Player.StartItem "PistolFixed"
  Player.StartItem "FistFixed"
  Player.StartItem "Clip", 50
}

ACTOR PistolFixed : Pistol replaces Pistol
{
  Game Doom
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.9
	Weapon.BobRangeY 1.0
  Weapon.AmmoGive 20
  Weapon.AmmoType "Clip"
  Obituary "$OB_MPPISTOL"
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
  Tag "$TAG_PISTOL"
Decal BulletChip
States
	{
Ready:

    PISG A 1 A_WeaponReady
	TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop
	  Deselect:


	TNT1 AA 0 A_Lower
     PISG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1
	  Select:

TNT1 A 0 A_PlaySound("weapons/pistol/draw")
	PISG A 1 A_Raise

    Goto Select+1
	  Fire:
TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

	TNT1 A 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)

	TNT1 A 0 A_FireProjectile("BulletTracer",random(-1,1),0,14,4)
	TNT1 A 0 A_GunFlash
    PISG A 0 A_FireBullets (5.6, 0, 1, 5, "BulletPuff")


PISG B 0 A_FireCustomMissile("MF1Creator",0,0,11,6)
PISG B 6

    PISG C 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    PISG A 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    PISG A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    PISG A 0 A_ReFire
    Goto Ready
  Flash:
    TNT1 A 0 A_ZoomFactor(0.98)

			TNT1 A 0 A_SetPitch(pitch-2.0) // was down on the C 1 line, remove this one
			TNT1 A 1
    TNT1 A 1 A_ZoomFactor(1.0)
			TNT1 A 1
			TNT1 AA 1 A_SetPitch(pitch+0.4) // TOTAL OF 0.8
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
    Goto LightDone

	}
}

ACTOR FistFixed: Fist replaces Fist
{
  Game Doom
  Weapon.SelectionOrder 3700
  Weapon.Kickback 100
    Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 1.8
	Weapon.BobRangeY 1.9
  Obituary "$OB_MPFIST"
  Tag "$TAG_FIST"
  +WEAPON.WIMPY_WEAPON
  +WEAPON.MELEEWEAPON
States

	{
	 Ready:


    PUNG A 1 A_WeaponReady
	TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop
 Deselect:


	TNT1 AA 0 A_Lower
     PUNG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1

  Select:
TNT1 A 0 A_PlayWeaponSound ("weapons/silence")

	PUNG A 1 A_Raise

    Goto Select+1
 Fire:
 TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

		NULL A 0 A_Custompunch(0,0,1,"FistPuff")
		NULL A 0 A_Custompunch(0,0,1,"MeleeQuakePuff")
		PUNG C 4 A_Punch
		PUNG D 5 
		PUNG C 4 
		PUNG B 0 A_ReFire
    Goto Ready
  }
}


Actor FistPuff
{
+NOBLOCKMAP
+NOGRAVITY
+PUFFONACTORS
-ALLOWPARTICLES
attacksound "EFECTS/MELEE"
seesound "bloodsplash"
}

Actor MeleeQuakePuff
{
+NOBLOCKMAP
+NOGRAVITY
+PUFFONACTORS
-ALLOWPARTICLES
States
	{
		Spawn:
		null a 3  Radius_Quake (3,3,0,4,0)
		null a 3  Radius_Quake (3,3,0,4,0)
		Stop
	}
}

ACTOR ChainsawFixed: Chainsaw replaces Chainsaw
{
  Game Doom
  SpawnID 32
  Weapon.Kickback 0
  Weapon.SelectionOrder 2200
  Weapon.UpSound "weapons/sawup"
  Weapon.ReadySound "weapons/sawidle"
  Damage 2
  decal sawmark
  Inventory.PickupMessage "$GOTCHAINSAW" // "A chainsaw!  Find some meat!"
  Obituary "$OB_MPCHAINSAW" // "%o was mowed over by %k's chainsaw."
  +WEAPON.MELEEWEAPON		
  States
  {
   Ready:
    SAWG CD 4 A_WeaponReady
    Loop



 Deselect:


	TNT1 AA 0 A_Lower
     SAWG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1

  Select:

TNT1 A 0 A_PlaySound("weapons/chainsaw/draw")
	SAWG A 1 A_Raise

    Goto Select+1



Fire:
TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)
	NULL A 0 A_GunFlash
	NULL A 0 A_Custompunch(0,0,1,"MeleeQuakePuff")
		NULL A 0 A_Custompunch(0,0,1,"FistPuff")
    SAWG AB 1 A_Saw
	SAWG A 2 A_FireCustomMissile("ChainsawSmoke",-50+RANDOM(-20,20),RANDOM(-20,20),0,2)
    SAWG B 1 A_ReFire
	SAWG A 4
	SAWG B 4
	SAWG C 4
	SAWG D 4
    goto Ready

Flash:
	NULL A 1 Radius_Quake (1,2,0,1,0)
	Stop
  Spawn:
    CSAW A 12
    Loop	
  }
}


actor ChainsawSmoke
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  RenderStyle Translucent 
  Scale 0.15
  Alpha 0.6
  Speed 2.5
  VSpeed 0.5
  States
  {	
	Spawn:
	    null a 3
		SMKB A 3
		SMKB b 3
		SMKB c 3
		SMKB d 3
		SMKB e 3
		SMKB f 3
		SMKB g 3
		SMKB h 3
		SMKB i 3
		SMKB j 3
		SMKB k 3
		SMKB l 3
		SMKB m 3
		Stop
  }
}

ACTOR ShotgunFixed: Shotgun replaces Shotgun
{
  Game Doom
  SpawnID 27
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 1
  Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.5
	Weapon.BobRangeY 0.6
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Inventory.PickupMessage "$GOTSHOTGUN"
  Obituary "$OB_MPSHOTGUN"
  Tag "$TAG_SHOTGUN"
Decal BulletChip
States
	{
  Ready:

    SHTG A 1 A_WeaponReady
	TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop

  Deselect:

	TNT1 AA 0 A_Lower
    SHTG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1

  Select:

		TNT1 A 0 A_PlaySound("weapons/shotgun/draw")
	SHTG A 1 A_Raise

    Goto Select+1
  Fire:
  TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

    SHTG A 0 A_FireBullets (5.6, 0, 7, 5, "BulletPuff")
    SHTG A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON)

		TNT1 AAAAAA 0 A_FireProjectile("BulletTracer",random(-3,3),0,10,random(-3,3))
SHTG A 0 A_FireCustomMissile("MF1Creator",0,0,7,4)
SHTG A 0 A_GunFlash


			SHTG B 8

			SHTG A 1
			SHTG A 1
			SHTG A 1
			SHTG A 0
			SHTG A 1

	

		SHTG A 9
		SHTG C 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    SHTG D 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    SHTG C 7 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    SHTG A 3 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    SHTG A 0 A_TakeInventory ("ShotgunChecker", 1)
    SHTG A 0 A_ReFire
	Goto Ready
	Goto Ready
Flash:
    TNT1 A 0 A_ZoomFactor(0.95)

			TNT1 AA 1 A_SetPitch(pitch-1.5)
			TNT1 A 1 A_SetPitch(pitch-1.4)
    TNT1 A 1 A_ZoomFactor(1.0)
			TNT1 A 1
			TNT1 AA 1 A_SetPitch(pitch+0.6)
			TNT1 AA 1 A_SetPitch(pitch+0.6)
			TNT1 A 1 A_SetPitch(pitch+0.4)
			TNT1 A 1 A_SetPitch(pitch+0.4)
			TNT1 AA 1 A_SetPitch(pitch+0.4)
			TNT1 AA 1 A_SetPitch(pitch+0.2)
			TNT1 AAA 2
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6

    Goto LightDone

	}
}

ACTOR SuperShotgunFixed: SuperShotgun replaces SuperShotgun
{
  Game Doom
  SpawnID 27
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 2
  Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.5
	Weapon.BobRangeY 0.6
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Inventory.PickupMessage "$GOTSHOTGUN2"
  Obituary "$OB_MPSSHOTGUN"
  Tag "$TAG_SUPERSHOTGUN"
Decal BulletChip
States
	{
  Ready:

    SHTG A 0
    SHT2 A 1 A_WeaponReady
	TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop
  Deselect:

	TNT1 AA 0 A_Lower
     SHT2 A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1

  Select:

		TNT1 A 0 A_PlaySound("weapons/ssg/draw")
	SHT2 A 1 A_Raise

    Goto Select+1
  Fire:
  TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)


    SHT2 A 0 A_FireBullets (11.2, 7.1, 20, 5, "BulletPuff")
    SHT2 A 0 A_PlaySound ("weapons/sshotf", CHAN_WEAPON)


		TNT1 AAAAAAAAAA 0 A_FireProjectile("BulletTracer",random(-7,7),0,10,random(-5,5))


SHT2 A 0
SHT2 A 0 A_FireCustomMissile("MF1Creator",0,0,9,4)
SHT2 A 0 A_GunFlash
			SHT2 B 8

			SHT2 A 1
			SHT2 A 1
			SHT2 A 1
			SHT2 A 0
			SHT2 AAA 1
			SHT2 A 2
			SHT2 C 4


    SHT2 D 7 A_OpenShotgun2
    SHT2 E 7
    SHT2 F 7 A_LoadShotgun2
	SHT2 F 0
    SHT2 G 6
	SHT2 H 3 A_PlaySoundEx ("weapons/sshotc", "Weapon")
    SHT2 H 6 A_CloseShotgun2
    SHT2 A 5 A_ReFire
		Goto Ready

    // unused states
    SHT2 B 7
    SHT2 A 3
    Goto Deselect
Flash:
    TNT1 A 0 A_ZoomFactor(0.95)

			TNT1 AA 1 A_SetPitch(pitch-1.5)
			TNT1 A 1 A_SetPitch(pitch-1.5)
			TNT1 A 1 A_SetPitch(pitch-0.3)
    TNT1 A 1 A_ZoomFactor(1.0)
			TNT1 A 1
			TNT1 AA 1 A_SetPitch(pitch+0.7)
			TNT1 AA 1 A_SetPitch(pitch+0.6)
			TNT1 A 1 A_SetPitch(pitch+0.4)
			TNT1 A 1 A_SetPitch(pitch+0.4)
			TNT1 AA 1 A_SetPitch(pitch+0.4)
			TNT1 AA 1 A_SetPitch(pitch+0.3)
			TNT1 AAA 2
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch+0.3) // TOTAL OF 0.6
			TNT1 AAAA 2
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6
			TNT1 AA 1 A_SetPitch(pitch-0.3) // TOTAL OF 0.6
    Goto LightDone
    Goto LightDone

	}
}

ACTOR ChaingunFixed: Chaingun replaces Chaingun
{
   Weapon.SelectionOrder 700
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip"
  Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.4
	Weapon.BobRangeY 0.5
   Inventory.PickupMessage "$GOTCHAINGUN" // "You got the minigun"
   Obituary "$OB_MPCHAINGUN" // "%o was mowed down by %k's minigun."
   AttackSound "weapons/minigun"
   Tag "$TAG_CHAINGUN"
	decal bulletchip
States
  {
   Spawn:
     MGUN A -1
  Ready:

     CHGG A 1 A_WeaponReady
	 TNT1 A 0 A_GiveInventory("DoSway", 1)
     Loop
  Deselect:

	TNT1 AA 0 A_Lower
     CHGG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1


  Select:


		TNT1 A 0 A_PlaySound("weapons/chaingun/draw")
	CHGG A 1 A_Raise

    Goto Select+1





   Fire:
   TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

	 CHGG A 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG B 1 A_FireBullets(3,3,1,5,"BulletPuff", 1)
	 CHGG C 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG D 1 A_GunFlash
	 CHGG E 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG F 1 A_FireBullets(3,3,1,5, "BulletPuff", 1)
	 CHGG G 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG H 1 A_GunFlash
	 CHGG I 1 A_ReFire
	 CHGG J 1 A_WeaponReady
	 CHGG K 1 A_WeaponReady
	 CHGG L 1 A_WeaponReady
	 CHGG M 2 A_WeaponReady
	 CHGG N 2 A_WeaponReady
	 CHGG O 2 A_WeaponReady
	 CHGG P 3 A_WeaponReady
	 CHGG Q 3 A_WeaponReady
	 CHGG R 3 A_WeaponReady
	 CHGG S 3 A_WeaponReady
	 CHGG T 4 A_WeaponReady
	 CHGG U 4 A_WeaponReady
	 CHGG V 4 A_WeaponReady
	 CHGG W 4 A_WeaponReady
	 CHGG X 5 A_WeaponReady
	 Goto Ready
	 Hold:
	 CHGG I 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG J 1 A_FireBullets(3,3,1,5,"BulletPuff", 1)
	 CHGG K 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG L 1 A_GunFlash
	 CHGG M 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG N 1 A_FireBullets(3,3,1,5,"BulletPuff", 1)
	 CHGG O 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG P 1 A_GunFlash
	 CHGG Q 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG R 1 A_FireBullets(3,3,1,5,"BulletPuff", 1)
	 CHGG S 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG T 1 A_GunFlash
	 CHGG U 1 A_FireCustomMissile("MF1Creator",0,0,6,0)
	 CHGG V 1 A_FireBullets(3,3,1,5,"BulletPuff", 1)
	 CHGG W 1 A_FireCustomMissile("ChaingunCasingSpawner",0,0,6,0)
	 CHGG X 1 A_GunFlash	 
	 CHGG A 1 A_ReFire
	 CHGG A 1 A_WeaponReady
	 CHGG B 1 A_WeaponReady
	 CHGG C 1 A_WeaponReady
	 CHGG D 1 A_WeaponReady
	 CHGG E 2 A_WeaponReady
	 CHGG F 2 A_WeaponReady
	 CHGG G 2 A_WeaponReady
	 CHGG H 3 A_WeaponReady
	 CHGG I 3 A_WeaponReady
	 CHGG J 3 A_WeaponReady
	 CHGG K 4 A_WeaponReady
	 CHGG L 4 A_WeaponReady
	 CHGG M 4 A_WeaponReady
	 CHGG N 5 A_WeaponReady
	 CHGG O 5 A_WeaponReady
	 CHGG P 5 A_WeaponReady
	 CHGG Q 6 A_WeaponReady
	 CHGG R 6 A_WeaponReady
	 CHGG S 6 A_WeaponReady
	 CHGG T 6 A_WeaponReady
	 CHGG U 7 A_WeaponReady
	 CHGG V 7 A_WeaponReady
	 CHGG W 7 A_WeaponReady
	 CHGG X 7 A_WeaponReady
     Goto Ready
	Flash:

		TNT1 A 0 A_FireProjectile("BulletTracer",random(-1,1),0,5,random(-3,3))
	NULL A 1 Radius_Quake (1,2,0,1,0)
	Stop
   }
}



ACTOR RocketLauncherFixed : Weapon Replaces RocketLauncher
{
  Game Doom
  SpawnID 29
  Weapon.SelectionOrder 2500
  Weapon.AmmoUse 1
    Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.5
	Weapon.BobRangeY 0.6
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "$GOTLAUNCHER"
  Tag "$TAG_ROCKETLAUNCHER"
  States
	{
  Spawn:
    LAUN A -1
    Stop
	Ready:

		MISG A 1 A_WeaponReady	
TNT1 A 0 A_GiveInventory("DoSway", 1)		
		Loop
  Deselect:



	TNT1 AA 0 A_Lower
     MISG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1

  Select:

		TNT1 A 0 A_PlaySound("weapons/rlan/draw")
	MISG A 1 A_Raise

    Goto Select+1
	Fire:
	TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

		MISG AB 2

		TNT1 A 0 A_PlaySound ("weapons/rocket")
		TNT1 A 0 A_FireCustomMissile("Rocket",0,1,7)
		TNT1 A 0 A_SetPitch(-1.5 + pitch)
		MISF A 0 A_FireCustomMissile("MF1Creator",0,0,9,4)
		MISF BBCD 3 A_SetPitch(0.25 + pitch)
		MISG AA 1 A_SetPitch(0.15 + pitch)
		MISG AA 1 A_SetPitch(0.10 + pitch)
		MISG A 0 A_Refire
Goto Ready
	}
}

ACTOR PlasmaRifleFixed: PlasmaRifle replaces PlasmaRifle
{
  Game Doom
  SpawnID 30
  Weapon.SelectionOrder 100
  Weapon.AmmoUse 1
  Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.4
	Weapon.BobRangeY 0.5
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.PickupMessage "$GOTPLASMA"
  Tag "$TAG_PLASMARIFLE"
  States
  {
  Ready:
    PLSG A 1 A_WeaponReady
	  TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop
  Deselect:

	TNT1 AA 0 A_Lower
     PLSG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1
  Select:

		TNT1 A 0 A_PlaySound("weapons/plasma/draw")
	PLSG A 1 A_Raise

    Goto Select+1
 Fire:
TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

	PLSG A 3 A_FireCustomMissile("PlasmaBall",0,1,10,-5)

    PLSG B 0
	PLSG B 20 A_ReFire
    Goto Ready
  Flash:
    PLSF A 4 Bright A_Light1
    Goto LightDone
    PLSF B 4 Bright A_Light1
    Goto LightDone
  Spawn:
    PLAS A -1
    Stop
  }
}

ACTOR BFG9000Fixed : BFG9000 replaces BFG9000
{
  Game Doom
  Height 20
  SpawnID 31
  Weapon.SelectionOrder 2800
    Weapon.BobStyle "InverseSmooth"
	Weapon.BobSpeed 2.5
	Weapon.BobRangeX 0.4
	Weapon.BobRangeY 0.5
  Weapon.AmmoUse 40
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  +WEAPON.NOAUTOFIRE
  Inventory.PickupMessage "$GOTBFG9000"
  Tag "$TAG_BFG9000"
States
	{
  Deselect:

	TNT1 AA 0 A_Lower
     BFGG A 1 A_Lower
	TNT1 A 0 A_PlayWeaponSound ("weapons/silence")
TNT1 A 0 A_TakeInventory("DoSway", 1)
    Goto Deselect+1
  Select:

		TNT1 A 0 A_PlaySound("weapons/bfg/draw")
	BFGG A 1 A_Raise

    Goto Select+1
  Ready:
    BFGG A 1 A_WeaponReady
	  TNT1 A 0 A_GiveInventory("DoSway", 1)
    Loop
     Fire:
	 TNT1 A 0 A_TakeInventory("DoSway", 1)
TNT1 A 0 A_GiveInventory("DoSway", 1)

    BFGG A 0 A_BFGSound
	BFGG A 20 Radius_Quake (1,30,0,1,0)

    BFGG B 5 A_GunFlash

    BFGG D 5 A_FireCustomMissile("BFGBall",0,0,4,0)
    BFGG EF 5 Radius_Quake (5,5,0,1,0)
    TNT1 A 0 A_TakeInventory("Cell", 40)
	BFGG G 5 A_ReFire
    goto Ready
    Flash:
	    BFGF A 2 bright
    	BFGF BBBB 1 bright A_Light2
		BFGF BBBB 1 bright A_Light2
		TNT1 A 0 A_Light0
    	Goto LightDone
  //Flash:
    //BFGF A 11 Bright A_Light1
    //BFGF B 6 Bright A_Light2
    //Goto LightDone
  Spawn:
    BFUG A -1
    Stop
  OldFire:
    BFGG A 10 A_BFGSound
    BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
    BFGG B 0 A_Light0
    BFGG B 20 A_ReFire
    Goto Ready
  }
}


ACTOR BFGBall
{
  Radius 13
  Height 8
  Speed 25
  Damage 100
  Projectile
  +RANDOMIZE
  RenderStyle Add
  Alpha 0.75
  DeathSound "weapons/bfgx"
  Obituary "$OB_MPBFG_BOOM"
  States
  {
  Spawn:
    BFS1 AB 4 Bright
    Loop
  Death:
    BFE1 AB 8 Bright
    BFE1 C 8 Bright A_BFGSpray
    BFE1 DEF 8 Bright
    Stop
  }
}