actor "TDI Vector" : RGUWeapon
{
  obituary "%k took down %o with the Vector."
  inventory.pickupmessage "TDI Vector"  
  //attacksound "ump45/fire6"
  weapon.selectionorder 10
  weapon.ammotype "VectorClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "VectorAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  -NOAUTOFIRE
  states
  {
  Ready:
    VECA A 2 //A_PlayWeaponSound("m9/select")
    VECA BCDEFGHIJKL 2 A_WeaponReady(WRF_NOPRIMARY)
    VECA L 0 A_JumpIfNoAmmo("Reload")
    VECA L 0 A_JumpIfInventory("Aiming",1,5)
    VECA L 0 A_JumpIfInventory("Reloading",1,"Reload")
    VECA L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    VECA L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECA L 1 A_WeaponReady
    goto Ready+12
    VECF F 0 A_JumpIfInventory("Reloading",1,"Reload")    
    VECF F 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    VECF F 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECF F 1 A_WeaponReady(WRF_NOBOB)
    goto Ready+18
  Deselect:
    VECA K 0 A_TakeInventory("Aiming",1)
    VECA K 0 ACS_ExecuteAlways(602,0,0,0,0)
    SPSA L 0 A_TakeInventory("Reloading",1)
    INTA L 0 A_ZoomFactor(1.0)
    VECA K 0 A_Lower
    VECA K 1 A_Lower
    goto Deselect+2
  Select:
    VECF A 0 A_Raise
	VECF A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire:	
    VECA A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    VECA K 0 A_JumpIfNoAmmo("ReloadStart")
    VECB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    VECB A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECB A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,10,0)
    VECB A 1 BRIGHT A_FireBullets (9.0, 9.0, -1, 8, "HHBulletPuff", 1, 6000)
    VECB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECB A 0 A_JumpIfNoAmmo("FireEmpty")
    VECB B 1 BRIGHT A_GunFlash
    VECB C 0
    VECB A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECB A 0 A_ReFire
    goto Ready+12
    VECB A 0 A_JumpIfNoAmmo("ReloadStart")
    VECB A 0 A_ReFire
    goto Ready+12
  Hold:
    VECB A 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    VECB A 0 A_JumpIfNoAmmo("ReloadStart")
    VECB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Hold_SteadyAim")
    VECB A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECB A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,10,0)
    VECB A 1 BRIGHT A_FireBullets (13.5, 13.5, -1, 8, "HHBulletPuff", 1, 6000)
    VECB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECB A 0 A_JumpIfNoAmmo("FireEmpty")
    VECB B 1 BRIGHT A_GunFlash
    VECB C 0
    VECB A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECB A 0 A_ReFire
    goto Ready+12
    U46B A 0 A_JumpIfNoAmmo("ReloadStart")
    U46B A 0 A_ReFire
    goto Ready+12
  FireEmpty:
    VECB B 1 BRIGHT A_GunFlash
    VECB C 1 A_GiveInventory("VectorBolt",1)
    VECB A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECB A 0 A_ReFire
    goto Ready+12
    U46B A 0 A_JumpIfNoAmmo("ReloadStart")
    U46B A 0 A_ReFire
    goto Ready+12
  FireAim:
    VECF A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECF A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,0)
    VECF G 1 BRIGHT A_FireBullets (2.5, 2.5, -1, 8, "HHBulletPuff", 1, 6000)
    VECF G 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECF G 0 A_JumpIfNoAmmo("FireAimEmpty")
    VECF H 1 BRIGHT A_GunFlash
    VECF I 0
    VECF A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECF A 0 A_ReFire
    goto Ready+18
    VECF A 0 A_JumpIfNoAmmo("ReloadStart")
    VECF A 0 A_ReFire
    goto Ready+18
  HoldAim:
    VECF A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECF A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,0)
    VECF G 1 BRIGHT A_FireBullets (7, 7, -1, 8, "HHBulletPuff", 1, 6000)
    VECF G 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECF G 0 A_JumpIfNoAmmo("FireAimEmpty")
    VECF H 1 BRIGHT A_GunFlash
    VECF I 0
    VECF A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECF A 0 A_ReFire
    goto Ready+18
    VECF A 0 A_JumpIfNoAmmo("ReloadStart")
    VECF A 0 A_ReFire
    goto Ready+18
  FireAimEmpty:
    VECF H 1 BRIGHT A_GunFlash
    VECF I 1 A_GiveInventory("VectorBolt",1)
    VECF A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECF A 0 A_ReFire
    goto Ready+18
    VECF A 0 A_JumpIfNoAmmo("ReloadStart")
    VECF A 0 A_ReFire
    goto Ready+18
  Reload: //AltFire:
    VECC A 0 A_JumpIfInventory("VectorAmmo",1,"ReloadStart")
    VECC A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    VECC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    VECC A 2 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    VECC BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC E 3 A_PlaySoundEx("vector/clipout","SoundSlot5")
    VECC FGHIJKLM 3 A_WeaponReady(WRF_NOFIRE)
    VECC N 3 A_TakeInventory("Reloading",1)
    VECC O 3 A_PlayWeaponSound("vector/clipin")
    goto ReloadAmmo
  ReloadAmmo:
    VECC P 0 A_GiveInventory("VectorClip",1)
    VECC P 0 A_TakeInventory("VectorAmmo",1)
    VECC P 0 A_JumpIfInventory("VectorClip",30,"ReloadEnd")
    VECC P 0 A_JumpIfInventory("VectorAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    VECC PQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC T 3 A_JumpIfInventory("VectorBolt",1,"ReloadEndBolt")
    VECA EFGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    VECA B 0 A_ReFire
    goto Ready+12
  ReloadEndBolt:
    VECC T 3 A_TakeInventory("VectorBolt",1)
    VECC UVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC X 3 A_PlayWeaponSound("vector/bolt")
    VECC YZ 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD ABCDE 3 A_WeaponReady(WRF_NOFIRE)
    VECD B 0 A_ReFire
    goto Ready+12
  AltFire:
    VECF A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    U45F A 0 A_ZoomFactor(1.2)
    VECF ABCDEF 1
    VECF G 0 A_GiveInventory("Aiming",1)
    VECF G 0 ACS_ExecuteAlways(602,0,0,0,0)
    VECF G 0 A_Refire
    goto Ready+18
  AltFire2:
    U45F A 0 A_ZoomFactor(1.0)
    VECF FEDCBA 1
    VECF A 0 A_TakeInventory("Aiming",1)
    VECF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    VECF G 0 A_Refire
    goto Ready+12
  AltHold:
    VECA L 1 A_JumpIfInventory("Aiming",1,"AltHoldAim")
    VECA L 1 A_ReFire
    goto Ready+12
  AltHoldAim:
    VECF F 1
    VECF F 1 A_ReFire
    goto Ready+18
  ReloadStartAim:
    U45F A 0 A_ZoomFactor(1.0)
    VECF FEDCBA 1
    VECF A 0 A_TakeInventory("Aiming",1)
    VECF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEAP A 15 
    TNT1 A 0 A_SpawnItemEx("VectorPickup")
    stop
  Fire_SteadyAim:
    VECB A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECB A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,10,0)
    VECB A 1 BRIGHT A_FireBullets (6.0, 6.0, -1, 8, "HHBulletPuff", 1, 6000)
    VECB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECB A 0 A_JumpIfNoAmmo("FireEmpty")
    VECB B 1 BRIGHT A_GunFlash
    VECB C 0
    VECB A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECB A 0 A_ReFire
    goto Ready+12
    VECB A 0 A_JumpIfNoAmmo("ReloadStart")
    VECB A 0 A_ReFire
    goto Ready+12
  Hold_SteadyAim:
    VECB A 0 A_PlayWeaponSound("vector/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",17)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    VECB A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,10,0)
    VECB A 1 BRIGHT A_FireBullets (8.91, 8.91, -1, 8, "HHBulletPuff", 1, 6000)
    VECB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    VECB A 0 A_JumpIfNoAmmo("FireEmpty")
    VECB B 1 BRIGHT A_GunFlash
    VECB C 0
    VECB A 0 A_JumpIfInventory("VectorAmmo",1,2)
    VECB A 0 A_ReFire
    goto Ready+12
    U46B A 0 A_JumpIfNoAmmo("ReloadStart")
    U46B A 0 A_ReFire
    goto Ready+12
  ReloadStart_SOH:
    VECC A 1 
    VECC BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC E 2 A_PlaySoundEx("vector/clipout","SoundSlot5")
    VECC FGHIJKLM 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC N 2 A_TakeInventory("Reloading",1)
    VECC O 2 A_PlayWeaponSound("vector/clipin")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    VECC P 0 A_GiveInventory("VectorClip",1)
    VECC P 0 A_TakeInventory("VectorAmmo",1)
    VECC P 0 A_JumpIfInventory("VectorClip",30,"ReloadEnd_SOH")
    VECC P 0 A_JumpIfInventory("VectorAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    VECC PQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC T 2 A_JumpIfInventory("VectorBolt",1,"ReloadEndBolt_SOH")
    VECA EFGHIJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECA B 0 A_ReFire
    goto Ready+12
  ReloadEndBolt_SOH:
    VECC T 2 A_TakeInventory("VectorBolt",1)
    VECC UVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC X 2 A_PlayWeaponSound("vector/bolt")
    VECC YZ 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD B 0 A_ReFire
    goto Ready+12
  FragGrenade:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA A 2 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 2
    TNT1 A 15 
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 2 
    goto Ready+1
  FragGrenade_SOH:
    GRNA A 1 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 1 
    goto Ready+1
  KnifeAttack:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  }
}

actor VectorClip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 30
    ammo.backpackamount 0
    ammo.backpackmaxamount 30
    +IGNORESKILL
}

actor VectorBolt : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "TDI Vector Ex Mags" : "TDI Vector"
{
  obituary "%k took down %o with the Vector."
  inventory.pickupmessage "TDI Vector"  
  //attacksound "ump45/fire6"
  weapon.selectionorder 10
  weapon.ammotype "VectorClip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "VectorAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  -NOAUTOFIRE
  states
  {
  Reload: //AltFire:
    VECC A 0 A_JumpIfInventory("VectorAmmo",1,"ReloadStart")
    VECC A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    VECC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    VECC A 2 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    VECC BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC E 3 A_PlaySoundEx("vector/clipout","SoundSlot5")
    VECC FGHIJKLM 3 A_WeaponReady(WRF_NOFIRE)
    VECC N 3 A_TakeInventory("Reloading",1)
    VECC O 3 A_PlayWeaponSound("vector/clipin")
    goto ReloadAmmo
  ReloadAmmo:
    VECC P 0 A_GiveInventory("VectorClip2",1)
    VECC P 0 A_TakeInventory("VectorAmmo",1)
    VECC P 0 A_JumpIfInventory("VectorClip2",45,"ReloadEnd")
    VECC P 0 A_JumpIfInventory("VectorAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    VECC PQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC T 3 A_JumpIfInventory("VectorBolt",1,"ReloadEndBolt")
    VECA EFGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    VECA B 0 A_ReFire
    goto Ready+12
  ReloadEndBolt:
    VECC T 3 A_TakeInventory("VectorBolt",1)
    VECC UVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC X 3 A_PlayWeaponSound("vector/bolt")
    VECC YZ 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD ABCDE 3 A_WeaponReady(WRF_NOFIRE)
    VECD B 0 A_ReFire
    goto Ready+12
  ReloadStart_SOH:
    VECC A 1 
    VECC BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC E 2 A_PlaySoundEx("vector/clipout","SoundSlot5")
    VECC FGHIJKLM 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC N 2 A_TakeInventory("Reloading",1)
    VECC O 2 A_PlayWeaponSound("vector/clipin")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    VECC P 0 A_GiveInventory("VectorClip2",1)
    VECC P 0 A_TakeInventory("VectorAmmo",1)
    VECC P 0 A_JumpIfInventory("VectorClip2",45,"ReloadEnd_SOH")
    VECC P 0 A_JumpIfInventory("VectorAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    VECC PQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC T 2 A_JumpIfInventory("VectorBolt",1,"ReloadEndBolt_SOH")
    VECA EFGHIJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECA B 0 A_ReFire
    goto Ready+12
  ReloadEndBolt_SOH:
    VECC T 2 A_TakeInventory("VectorBolt",1)
    VECC UVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECC X 2 A_PlayWeaponSound("vector/bolt")
    VECC YZ 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    VECD B 0 A_ReFire
    goto Ready+12
  ReloadStartAim:
    U45F A 0 A_ZoomFactor(1.0)
    VECF FEDCBA 1
    VECF A 0 A_TakeInventory("Aiming",1)
    VECF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  }
}

actor VectorClip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 45
    ammo.backpackamount 0
    ammo.backpackmaxamount 45
    +IGNORESKILL
}

actor VectorExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor VectorPickup : CustomInventory
{
  inventory.pickupmessage "TDI Vector"  
  inventory.pickupsound "misc/w_pkup"
  +INVENTORY.AUTOACTIVATE
  inventory.respawntics 35
  scale 0.15
  States
  {
  Spawn:
    WEAP A -1
    stop
  Pickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("TDI Vector",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    JDGP A 0 A_JumpIfInventory("TDI Vector Ex Mags",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("MaxWeaponsFilled",0,"FailPickup2")
    BKPK A 0 ACS_ExecuteWithResult(618,10,0,0)
    stop
  AmmoPickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("VectorAmmo",0,"FailPickup")
    JDGP A 0 A_GiveInventory("VectorAmmo",30)
    stop
  FailPickup:
    WEAP A 1
    fail
  FailPickup2:
    WEAP A 1 
    BKPK A 0 ACS_ExecuteAlways(620,0,0,0,0)
    fail
  }
}

