ACTOR SFortRailgun : Railgun
{
  Weapon.Selectionorder 100
  Weapon.AmmoUse 10
  Weapon.AmmoType2 "Cell"
  Weapon.AmmoGive2 0
  Weapon.AmmoUse2 10
  Tag "Railgun"
  DamageType "Rail"
  Obituary "%o was railed by %k."
  Decal RailScorch
  Decal RailScorchLower
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Spawn:
    RAIL A -1 Bright
    Stop
  Ready:
    RLGG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	Loop
  Deselect:
    TNT1 A 0 A_TakeInventory("PowerRailgunSlower")
    TNT1 A 0 A_TakeInventory("ZoomedRail",2)
    TNT1 A 0 A_ZoomFactor(1)
    RLGG A 0 A_Lower
    Loop
  Select:
    RLGG A 1 A_Raise
    Loop
  Fire:
	TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
    TNT1 A 0 A_GiveInventory("RailgunSlower")
    TNT1 A 0 A_Refire("Hold")
    Goto Fire1
  Hold:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar1",0)
    RLGG A 1 ACS_NamedExecuteAlways("RailgunDMG1",0)
    TNT1 A 0 A_Refire("HoldReload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire1
  HoldReload:
    TNT1 A 0 A_CheckForReload(8,"Hold")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailchr",CHAN_WEAPON)
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold2:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar2",0)
    RLGG B 1 ACS_NamedExecuteAlways("RailgunDMG2",0)
    TNT1 A 0 A_Refire("Hold2Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire2
  Hold2Reload:
    TNT1 A 0 A_CheckForReload(6,"Hold2")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold3:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar3",0)
    RLGG B 1 ACS_NamedExecuteAlways("RailgunDMG3",0)
    TNT1 A 0 A_Refire("Hold3Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire3
  Hold3Reload:
    TNT1 A 0 A_CheckForReload(6,"Hold3")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold4:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar4",0)
    RLGG C 1 ACS_NamedExecuteAlways("RailgunDMG4",0)
    TNT1 A 0 A_Refire("Hold4Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire4
  Hold4Reload:
    TNT1 A 0 A_CheckForReload(6,"Hold4")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold5:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar5",0)
    RLGG C 1 ACS_NamedExecuteAlways("RailgunDMG5",0)
    TNT1 A 0 A_Refire("Hold5Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire5
  Hold5Reload:
    TNT1 A 0 A_CheckForReload(6,"Hold5")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold6:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar6",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG6",0)
    TNT1 A 0 A_Refire("Hold6Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire6
  Hold6Reload:
    TNT1 A 0 A_CheckForReload(17,"Hold6")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold7:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar7",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG7",0)
    TNT1 A 0 A_Refire("Hold7Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire7
  Hold7Reload:
    TNT1 A 0 A_CheckForReload(17,"Hold7")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold8:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar8",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG8",0)
    TNT1 A 0 A_Refire("Hold8Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire8
  Hold8Reload:
    TNT1 A 0 A_CheckForReload(17,"Hold8")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold9:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar9",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG9",0)
    TNT1 A 0 A_Refire("Hold9Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire9
  Hold9Reload:
    TNT1 A 0 A_CheckForReload(17,"Hold9")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailbeep",CHAN_5)
  Hold10:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar10",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG10",0)
    TNT1 A 0 A_Refire("Hold10Reload")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire10
  Hold10Reload:
    TNT1 A 0 A_CheckForReload(17,"Hold10")
    TNT1 A 0 A_ResetReloadCounter
    TNT1 A 0 A_Playsound("weapons/srailfull",CHAN_5)
  Hold11:
    TNT1 A 0 A_FireCustomMissile("RailLaser",0,0,0,4)
    TNT1 A 0 ACS_NamedExecuteAlways("RailgunBar11",0)
    RLGG D 1 ACS_NamedExecuteAlways("RailgunDMG11",0)
    TNT1 A 0 A_Refire("Hold11")
    TNT1 A 0 A_ResetReloadCounter
    Goto Fire11
  Fire1:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad1")
	TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire1")
	TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire1")
	TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire1")
	TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire1")
	TNT1 A 0 A_RailAttack(100,0,1,"00FFFF","00FFFF",0,0,"RailPuff",0,0,0,20,2.5,1.0,"None")
	Goto FireEnd
  BlueFire1:
	TNT1 A 0 A_RailAttack(100,0,1,"00A0FF","00A0FF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
	Goto FireEnd
  RedFire1:
	TNT1 A 0 A_RailAttack(100,0,1,"FF0000","FF0000",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
	Goto FireEnd
  GreenFire1:
	TNT1 A 0 A_RailAttack(100,0,1,"00FF00","00FF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
	Goto FireEnd
  GoldFire1:
	TNT1 A 0 A_RailAttack(100,0,1,"FFBF00","FFBF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
	Goto FireEnd
  Fire2:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad2")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire2")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire2")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire2")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire2")
	TNT1 A 0 A_RailAttack(110,0,1,"00FFFF","00FFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
    Goto FireEnd
  BlueFire2:
	TNT1 A 0 A_RailAttack(110,0,1,"00A0FF","00A0FF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
    Goto FireEnd
  RedFire2:
	TNT1 A 0 A_RailAttack(110,0,1,"FF0000","FF0000",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
    Goto FireEnd
  GreenFire2:
	TNT1 A 0 A_RailAttack(110,0,1,"00FF00","00FF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
    Goto FireEnd
  GoldFire2:
	TNT1 A 0 A_RailAttack(110,0,1,"FFBF00","FFBF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.5,1.0,"None")
    Goto FireEnd
  Fire3:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad3")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire3")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire3")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire3")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire3")
	TNT1 A 0 A_RailAttack(120,0,1,"00FFFF","00FFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.25,1.0,"None")
    Goto FireEnd
  BlueFire3:
	TNT1 A 0 A_RailAttack(120,0,1,"00A0FF","00A0FF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.25,1.0,"None")
    Goto FireEnd
  RedFire3:
	TNT1 A 0 A_RailAttack(120,0,1,"FF0000","FF0000",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.25,1.0,"None")
    Goto FireEnd
  GreenFire3:
	TNT1 A 0 A_RailAttack(120,0,1,"00FF00","00FF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.25,1.0,"None")
    Goto FireEnd
  GoldFire3:
	TNT1 A 0 A_RailAttack(120,0,1,"FFBF00","FFBF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,20,3.25,1.0,"None")
    Goto FireEnd
  Fire4:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad4")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire4")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire4")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire4")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire4")
	TNT1 A 0 A_RailAttack(130,0,1,"00FFFF","00FFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,3.0,1.0,"None")
    Goto FireEnd
  BlueFire4:
	TNT1 A 0 A_RailAttack(130,0,1,"00A0FF","00A0FF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,3.0,1.0,"None")
    Goto FireEnd
  RedFire4:
	TNT1 A 0 A_RailAttack(130,0,1,"FF0000","FF0000",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,3.0,1.0,"None")
    Goto FireEnd
  GreenFire4:
	TNT1 A 0 A_RailAttack(130,0,1,"00FF00","00FF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,3.0,1.0,"None")
    Goto FireEnd
  GoldFire4:
	TNT1 A 0 A_RailAttack(130,0,1,"FFBF00","FFBF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,3.0,1.0,"None")
    Goto FireEnd
  Fire5:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad5")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire5")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire5")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire5")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire5")
	TNT1 A 0 A_RailAttack(140,0,1,"00FFFF","00FFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,2.75,1.0,"None")
    Goto FireEnd
  BlueFire5:
	TNT1 A 0 A_RailAttack(140,0,1,"00A0FF","00A0FF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,2.75,1.0,"None")
    Goto FireEnd
  RedFire5:
	TNT1 A 0 A_RailAttack(140,0,1,"FF0000","FF0000",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,2.75,1.0,"None")
    Goto FireEnd
  GreenFire5:
	TNT1 A 0 A_RailAttack(140,0,1,"00FF00","00FF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,2.75,1.0,"None")
    Goto FireEnd
  GoldFire5:
	TNT1 A 0 A_RailAttack(140,0,1,"FFBF00","FFBF00",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,25,2.75,1.0,"None")
    Goto FireEnd
  Fire6:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad6")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire6")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire6")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire6")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire6")
	TNT1 A 0 A_RailAttack(150,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,1.0,"None")
    Goto FireEnd2
  BlueFire6:
	TNT1 A 0 A_RailAttack(150,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,1.0,"None")
    Goto FireEnd2
  RedFire6:
	TNT1 A 0 A_RailAttack(150,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,1.0,"None")
    Goto FireEnd2
  GreenFire6:
	TNT1 A 0 A_RailAttack(150,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,1.0,"None")
    Goto FireEnd2
  GoldFire6:
	TNT1 A 0 A_RailAttack(150,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,1.0,"None")
    Goto FireEnd2
  Fire7:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad7")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire7")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire7")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire7")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire7")
	TNT1 A 0 A_RailAttack(160,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.9,"None")
    Goto FireEnd2
  BlueFire7:
	TNT1 A 0 A_RailAttack(160,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.9,"None")
    Goto FireEnd2
  RedFire7:
	TNT1 A 0 A_RailAttack(160,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.9,"None")
    Goto FireEnd2
  GreenFire7:
	TNT1 A 0 A_RailAttack(160,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.9,"None")
    Goto FireEnd2
  GoldFire7:
	TNT1 A 0 A_RailAttack(160,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.9,"None")
    Goto FireEnd2
  Fire8:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad8")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire8")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire8")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire8")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire8")
	TNT1 A 0 A_RailAttack(170,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.8,"None")
    Goto FireEnd2
  BlueFire8:
	TNT1 A 0 A_RailAttack(170,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.8,"None")
    Goto FireEnd2
  RedFire8:
	TNT1 A 0 A_RailAttack(170,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.8,"None")
    Goto FireEnd2
  GreenFire8:
	TNT1 A 0 A_RailAttack(170,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.8,"None")
    Goto FireEnd2
  GoldFire8:
	TNT1 A 0 A_RailAttack(170,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.8,"None")
    Goto FireEnd2
  Fire9:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad9")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire9")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire9")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire9")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire9")
	TNT1 A 0 A_RailAttack(180,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.7,"None")
    Goto FireEnd2
  BlueFire9:
	TNT1 A 0 A_RailAttack(180,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.7,"None")
    Goto FireEnd2
  RedFire9:
	TNT1 A 0 A_RailAttack(180,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.7,"None")
    Goto FireEnd2
  GreenFire9:
	TNT1 A 0 A_RailAttack(180,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.7,"None")
    Goto FireEnd2
  GoldFire9:
	TNT1 A 0 A_RailAttack(180,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.7,"None")
    Goto FireEnd2
  Fire10:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad10")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire10")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire10")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire10")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire10")
	TNT1 A 0 A_RailAttack(190,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.6,"None")
    Goto FireEnd2
  BlueFire10:
	TNT1 A 0 A_RailAttack(190,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.6,"None")
    Goto FireEnd2
  RedFire10:
	TNT1 A 0 A_RailAttack(190,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.6,"None")
    Goto FireEnd2
  GreenFire10:
	TNT1 A 0 A_RailAttack(190,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.6,"None")
    Goto FireEnd2
  GoldFire10:
	TNT1 A 0 A_RailAttack(190,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.6,"None")
    Goto FireEnd2
  Fire11:
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad11")
    TNT1 A 0 A_JumpIfInventory("BlueTeamToken",1,"BlueFire11")
    TNT1 A 0 A_JumpIfInventory("RedTeamToken",1,"RedFire11")
    TNT1 A 0 A_JumpIfInventory("GreenTeamToken",1,"GreenFire11")
    TNT1 A 0 A_JumpIfInventory("GoldTeamToken",1,"GoldFire11")
	TNT1 A 0 A_RailAttack(200,0,1,"00FFFF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.5,"None")
    Goto FireEnd2
  BlueFire11:
	TNT1 A 0 A_RailAttack(200,0,1,"00A0FF","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.5,"None")
    Goto FireEnd2
  RedFire11:
	TNT1 A 0 A_RailAttack(200,0,1,"FF0000","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.5,"None")
    Goto FireEnd2
  GreenFire11:
	TNT1 A 0 A_RailAttack(200,0,1,"00FF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.5,"None")
    Goto FireEnd2
  GoldFire11:
	TNT1 A 0 A_RailAttack(200,0,1,"FFBF00","FFFFFF",RGF_FULLBRIGHT,0,"RailPuff",0,0,0,0,2.5,0.5,"None")
    Goto FireEnd2
/*  FireEnd:
	TNT1 A 0 A_GunFlash
    TNT1 A 0 A_TakeInventory("PowerRailgunSlower")
	TNT1 A 0 A_GiveInventory("RailgunShot",1)
	RLGG E 6 A_Playsound("weapons/railgun", CHAN_WEAPON)
	TNT1 A 0 A_JumpIfInventory("ZoomedRail",1,"FireZoomOut2")
  FireZoomOutDone2:
	TNT1 A 0 A_JumpIfInventory("RailgunShot",4,"FireEndReload")//A_CheckForReload(4, "Reloaded")
	Goto Reloaded*/
  FireEndReload:
	//TNT1 A 0 A_TakeInventory("RailgunShot",4)
	TNT1 A 0 A_JumpIfInventory("ZoomedRail",1,"FireZoomOut")
  FireZoomOutDone:
	TNT1 A 0 A_CheckReload 
    RLGG F 6 A_Playsound("weapons/railreload1",CHAN_AUTO)
    RLGG GHI 6
	RLGG J 6
	RLGG K 6 A_Playsound("weapons/railreload2",CHAN_AUTO)
    RLGG L 6 A_ResetReloadCounter
    RLGG A 4 //A_ReFire("Fire")
    Goto Ready
/*  Reloaded:
	RLGG E 6
    RLGG A 2
    TNT1 A 0 A_ReFire
    Goto Ready*/
  FireEnd:
	TNT1 A 0 A_GunFlash
    TNT1 A 0 A_TakeInventory("PowerRailgunSlower")
	RLGG E 6 A_Playsound("weapons/railgun",CHAN_WEAPON)
	Goto FireEndReload
  FireEnd2:
	TNT1 A 0 A_GunFlash
    TNT1 A 0 A_TakeInventory("PowerRailgunSlower")
	RLGG E 6 A_Playsound("weapons/srailf",CHAN_WEAPON)
	Goto FireEndReload
  FireZoomOut:
    TNT1 A 0 A_Playsound("weapons/zoomout",CHAN_AUTO)
	TNT1 A 0 A_TakeInventory("ZoomedRail",2)
    TNT1 A 0 A_ZoomFactor(1)
	Goto FireZoomOutDone
  Quad1:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire1+1
  Quad2:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire2+1
  Quad3:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire3+1
  Quad4:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire4+1
  Quad5:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire5+1
  Quad6:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire6+1
  Quad7:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire7+1
  Quad8:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire8+1
  Quad9:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire9+1
  Quad10:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire10+1
  Quad11:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire11+1
  Flash:
	TNT1 A 6 A_Light1
    Goto LightDone
  Altfire:
    TNT1 A 0 A_Playsound("weapons/zoomin",CHAN_AUTO)
	TNT1 A 0 A_ZoomFactor(2.5,ZOOM_INSTANT)
    TNT1 A 0 A_GiveInventory("ZoomedRail",1)
	TNT1 A 0 A_Refire("Fire")
	Goto Ready
  Reload:
    TNT1 A 0 A_Print("$INFO_MARKSMAN",0.0625)
    Goto Ready
  }
}

ACTOR RailPuff : BulletPuff
{
  +NOBLOCKMAP
  +ALWAYSPUFF
  +CLIENTSIDEONLY
  +ALLOWPARTICLES
  DamageType "Railgun"
  Decal RailScorch
  Decal RailScorchLower
  States
  {
  Spawn:
  See:
  Crash:
  Death:
	TNT1 A 0
    RPUF A 1
    RPUF A 3 A_Playsound("weapons/railhit",CHAN_AUTO)
    RPUF BCD 4
    Stop
  XDeath:
	TNT1 A 1 A_Playsound("misc/bullethit",CHAN_AUTO)
	Stop
  }
}

ACTOR ZoomedRail : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR RailLaser : FastProjectile
{
  Radius 1
  Height 0
  Damage 0
  Speed 10000
  +CLIENTSIDEONLY
  States
  {
  Spawn:
	TNT1 A 1
	Loop
  Crash:
  Death:
  XDeath:
    TNT1 A 1
	Stop
  }
}

ACTOR RailgunShot : Inventory
{
	Inventory.MaxAmount 4
}

ACTOR PowerRailgunSlower : PowerSpeed
{
	Speed 0.3333333333
	+POWERSPEED.NOTRAIL
}

ACTOR RailgunSlower : PowerupGiver
{
	-INVENTORY.INVBAR
	+INVENTORY.AUTOACTIVATE
	Powerup.Type RailgunSlower
	Powerup.Duration 0x7FFFFFFF
	Inventory.Amount 1
	Inventory.MaxAmount 1
}

ACTOR MarksmanFist : SFortFist
{
	Inventory.RestrictedTo "MarksmanPlayer"
	States
	{
	Reload:
      TNT1 A 0 A_Print("$INFO_MARKSMAN",0.0625)
      Goto Ready
	}
}

ACTOR MarksmanPistol : SFortPistol
{
	Inventory.RestrictedTo "MarksmanPlayer"
	States
	{
	Reload:
	  TNT1 A 0 A_Print("$INFO_MARKSMAN",0.0625)//TNT1 A 0 ACS_NamedExecuteAlways("ClassInfo_Enter",0)
	  Goto Ready
	}
}

ACTOR MarksmanShotgun : SFortShotgun
{
	Inventory.RestrictedTo "MarksmanPlayer"
	States
	{
	Reload:
      TNT1 A 0 A_Print("$INFO_MARKSMAN",0.0625)
      Goto Ready
	}
}

ACTOR MarksmanMachinegun : SFortMachinegun
{
	Inventory.RestrictedTo "MarksmanPlayer"
	States
	{
	Reload:
      TNT1 A 0 A_Print("$INFO_MARKSMAN",0.0625)
      Goto Ready
	}
}