Actor Colt:	Weapon Replaces Pistol
{
Weapon.AmmoUse1 0
Weapon.AmmoGive1 7
Weapon.AmmoUse2 0
Weapon.AmmoGive2 0
Weapon.AmmoType1 "Clip"
Weapon.AmmoType2 "BDPistolAmmoAlt"
Weapon.BobRangeX 0.75
Weapon.BobRangeY 0.5
Weapon.BobSpeed 1.5
Weapon.BobStyle "InverseAlpha" //Denis Belmondo's Bobstyle
AttackSound "None"
Inventory.PickUpSound "MP40_Take"
Inventory.PickUpMessage "M1911 Handgun"
+WEAPON.WIMPY_WEAPON
+WEAPON.NOAUTOAIM
+WEAPON.NOAUTOFIRE
+WEAPON.NOALERT
Inventory.Icon "COLTBACK"
Tag "1911 Handgun"
Scale 0.9
States
{
Ready:
TNT1 A 0 A_PlaySound("Deploy/luger")
Z19S ABCDEFGH 1 
Goto RealReady

RealReady:
Z19G A 1 A_WeaponReady
TNT1 A 0 A_SetCrosshair(0)
PISG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
TNT1 A 0 A_JumpIfInventory("BWgrenade",1,"LaunchGrenade")
TNT1 A 0 A_JumpIfInventory("Meleeattack",1,"KnifeAttack")
PISG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
PISG A 0 A_JumpIfInventory("Reloading",1,"Reload")
Loop

Deselect:
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_Takeinventory("ADSmode",1)
TNT1 A 0 A_Takeinventory("Meleeattack",1)
TNT1 A 0 A_Takeinventory("BWgrenade",1)
TNT1 A 0 A_Takeinventory("Reloading",1)
tnt1 a 0 a_ZoomFactor(1.0)
Z19S HGFEDCBA 1
TNT1 A 0 A_Lower
Wait

Select:
TNT1 A 0 A_Raise
Wait

NoAmmo:
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_Takeinventory("ADSmode",1)
TNT1 A 0 A_ZoomFactor(1.0)
Goto Realready
	
Fire:
TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt",1,1)
Goto Reload
TNT1 A 0 A_PlaySound("weapons/rifle")
tnt1 a 0 a_alertmonsters
TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
Z19G B 1 BRIGHT A_FireBullets (2, 2, -1, 18, "HitPuff")
RIFF A 0 A_FireCustomMissile("Tracer", random(-2,2), 0, -1, 0)
TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
TNT1 A 0 A_Takeinventory("BDPistolAmmoAlt",1)
TNT1 A 0 A_GiveInventory("ColtMagCounter",1)
TNT1 A 0 A_SetPitch(pitch - 0.6)
Z19G C 1 
TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,8,-9)
Z19G DED 1
Goto RealReady

Ready2:
Z191 A 1 A_WeaponReady
TNT1 A 0 A_SetCrosshair(5)
PISG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
TNT1 A 0 A_JumpIfInventory("BWgrenade",1,"LaunchGrenade")
TNT1 A 0 A_JumpIfInventory("Meleeattack",1,"KnifeAttack")
PISG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
PISG A 0 A_JumpIfInventory("Reloading",1,"Reload")
Loop

NoAmmo:
Goto RealReady

AltFire:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Unzoom")
TNT1 A 0 A_Giveinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.7)
TNT1 A 0 A_Giveinventory("ADSmode",1)
Z19X ABCD 1 
Goto Ready2

UnZoom:
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_Takeinventory("ADSmode",1)
Z19X DCBA 1 
Goto RealReady

Fire2:
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt",1,1)
Goto Reload
TNT1 A 0 A_PlaySound("weapons/rifle")
tnt1 a 0 a_alertmonsters
TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
Z191 B 1 BRIGHT A_FireBullets (1, 1, -1, 15, "HitPuff")
RIFF A 0 A_FireCustomMissile("Tracer", random(-2,2), 0, -1, 0)
TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
TNT1 A 0 A_Takeinventory("BDPistolAmmoAlt",1)
TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
TNT1 A 0 A_GiveInventory("ColtMagCounter",1)
TNT1 A 0 A_SetPitch(pitch - 0.2)
Z191 C 1 
TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,8,-9)
Z191 DED 1
Goto Ready2

Reload:
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt",1,"Reload2")
TNT1 A 0 A_TakeInventory("Reloading",1)
TNT1 A 0 A_TakeInventory("ADSmode",1)
TNT1 A 0 A_TakeInventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt", 7, "InsertBullets")
TNT1 A 0 A_JumpIfInventory("Clip",1,3)
Goto NoAmmo
TNT1 AAA 0
Z1R2 ABCDEFG 1 
Z1R3 A 2
Z1R4 A 2
TNT1 A 0 A_PlaySound("M191OUT", 6)
Z1R4 BCD 2
TNT1 A 0 A_TakeInventory("ColtMagCounter",7)
TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
Z1R4 EF 2 
Z1R3 D 3 
TNT1 A 0 A_PlaySound("M191IN", 6)
Z1R3 EFG 2
Z1R3 GGG 2 
Z1R3 HI 2 
TNT1 A 0 A_PLAYSOUND("COLT/SNAP")
Z1R3 JKLMN 2
Z19R HGFEDCBA 1 

InsertBullets:

TNT1 AAAA 0
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt",7,"RealReady")
TNT1 A 0 A_JumpIfInventory("Clip",1,"AmmoIn")
Goto RealReady

AmmoIn:
TNT1 AAAAAA 0
TNT1 A 0 A_Giveinventory("BDPistolAmmoAlt",1)
TNT1 A 0 A_Takeinventory("Clip",1)
Goto InsertBullets


Reload2:
TNT1 A 0 A_TakeInventory("Reloading",1)
TNT1 A 0 A_TakeInventory("ADSmode",1)
TNT1 A 0 A_TakeInventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt", 7, "InsertBullets")
TNT1 A 0 A_JumpIfInventory("Clip",1,3)
Goto NoAmmo
TNT1 AAA 0
Z19R ABCDEFGH 1 
Z1R1 ABCD 2
TNT1 A 0 A_PlaySound("M191OUT", 6)
Z1R1 EFGH 2
TNT1 A 0 A_JumpIfInventory("ColtMagCounter",7,"Releasemag")
Goto ContinueReload

ReleaseMag:
TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
tnt1 a 0 a_TakeInventory("ColtMagCounter",7)
ContinueReload:
Z1R1 H 5
Z1R1 HGFE 2
TNT1 A 0 A_PlaySound("M191IN", 6)
Z1R1 DCBA 2
Z19R HGFEDCBA 1 

InsertBullets2:

TNT1 AAAA 0
TNT1 A 0 A_JumpIfInventory("BDPistolAmmoAlt",8,"RealReady")
TNT1 A 0 A_JumpIfInventory("Clip",1,"AmmoIn2")
Goto RealReady

AmmoIn2:
TNT1 AAAAAA 0
TNT1 A 0 A_Giveinventory("BDPistolAmmoAlt",1)
TNT1 A 0 A_Takeinventory("Clip",1)
Goto InsertBullets2

Spawn:
COLP A -1
Stop

DoKick:
TNT1 A 0
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_Takeinventory("ADSmode",1)
TNT1 A 0 A_PlaySound("KICK")
TNT1 A 0 SetPlayerProperty(0,1,0)
KICK BCD 1
RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
KICK H 4
KICK A 0 A_Takeinventory("Kicking",1)
KICK IGFEDCBA 1
TNT1 A 0 SetPlayerProperty(0,0,0)
Goto RealReady

Taunt:
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 5
FUCK A 2
TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
FUCK B 2 A_PlaySound("FUCK", 1)
FUCK C 2 A_AlertMonsters
FUCK D 15 A_Takeinventory("Taunting",1)
FUCK CBA 5
TNT1 A 5
Goto RealReady

LaunchGrenade:	
TNT1 A 0
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_TakeInventory("LaunchGrenade", 1)
TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1)
Goto NoGrenade
NGRA ABCD 2
TNT1 A 0 A_playSound("Pick/granate")
NGRA DD 2
TNT1 A 0 A_Jump(90,2)
TNT1 A 0 A_PlaySound("*grenadecall", CHAN_VOICE)
 NGRA DEFG 2
TNT1 A 0 A_PLaySound ("Launch/granate")
TNT1 A 0 A_FireCustomMissile("HandGrenade2", random(-3,3), 1, 0, 0, 0, 0)
GRWF STUVW 2 
TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
TNT1 A 1 
TNT1 A 0 A_TakeInventory("LaunchGrenade", 1)
TNT1 A 0 A_Takeinventory("BWgrenade",1)
Goto RealReady

NoGrenade:
TNT1 A 0
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_Takeinventory("ADSmode",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_Print("No Grenades Left!")
TNT1 A 0 A_Takeinventory("BWgrenade",1)
Goto RealReady



KnifeAttack:
TNT1 A 0 A_Takeinventory("Zoomed",1)
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_Jump(90,2)
TNT1 A 0 A_PlaySound("*taunt", CHAN_VOICE)
KNIF ABCDE 1
KNIF F 1 A_PlaySound("weapons/wknife")
KNIF F 0 A_Custompunch(16,0,1,"KnifePuff")
KNIF GHI 1 
TNT1 A 0 A_Takeinventory("Meleeattack",1)
GOTO RealREADY
}
}


ACTOR BDPistolAmmoAlt : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 8
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 8
}

Actor ColtMagCounter: Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 7
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 7
}

