// Admin pistol
actor AdminPistol : AOWWeapon {
	+NOAUTOFIRE
	+NOAUTOAIM
	Obituary "$OB_ADMIN"
	Weapon.SelectionOrder 85
	Weapon.PreferredSkin "MarineAdmin"
	States {
	Spawn:
		TNT1 A 0 
		stop
	Ready: 
		GPIS A 1 A_WeaponReady
		wait
	Deselect:
		TNT1 A 1 A_Lower 
		loop
	Select: 
		GPIS A 1 A_Raise
		Loop
	Fire:
		GPIS B 0 A_JumpIfInventory ("AdminPistolRotation", 2, "Fire.Deconstruction")
		GPIS B 0 A_JumpIfInventory ("AdminPistolRotation", 1, "Fire.Repair")
		goto Fire.Normal
	Fire.Normal:
		GPIS B 0 A_GunFlash
		GPIS B 0 A_PlayWeaponSound ("pistol/fire")
		GPIS B 0 A_FireBullets (0, 0, 1, 10000, "ExplosionPuff")
		GPIS B 0 A_FireBullets (0, 0, 1, 100000, "HandgunPuff")
		GPIS B 0 A_FireBullets (0, 0, 1, 10000, "ExplosionPuff")
		GPIS B 1 A_FireBullets (0, 0, 1, 100000, "HandgunPuff")
		GPIS B 0 A_GunFlash
		GPIS C 0 A_PlayWeaponSound ("pistol/fire")
		GPIS C 0 A_FireBullets (0, 0, 1, 10000, "ExplosionPuff")
		GPIS C 0 A_FireBullets (0, 0, 1, 100000, "HandgunPuff")
		GPIS C 0 A_FireBullets (0, 0, 1, 10000, "ExplosionPuff")
		GPIS C 1 A_FireBullets (0, 0, 1, 100000, "HandgunPuff")
		GPIS C 0 A_Refire
		goto Ready
	Fire.Repair:
		GPIS A 0 A_GunFlash
		GPIS A 0 A_PlayWeaponSound ("repairgun/fire")
		GPIS A 0 A_FireBullets (0.5, 0.5, 2, 0, "RepairDisarmPuff") // visual puff
		GPIS A 0 A_FireBullets (0.5, 0.5, 2, 0, "MedicPuff") // visual puff
		GPIS A 0 ACS_ExecuteAlways (650, 0, 500, 0) // repair+heal
		GPIS A 2 BRIGHT A_FireBullets (0, 0, 2, 500, "DisarmPuff") // disarm
		GPIS B 0 A_GunFlash
		GPIS B 0 A_PlayWeaponSound ("repairgun/fire")
		GPIS B 0 A_FireBullets (0.5, 0.5, 2, 0, "RepairDisarmPuff") // visual puff
		GPIS B 0 A_FireBullets (0.5, 0.5, 2, 0, "MedicPuff") // visual puff
		GPIS B 0 ACS_ExecuteAlways (650, 0, 500, 0) // repair+heal
		GPIS B 2 BRIGHT A_FireBullets (0, 0, 2, 500, "DisarmPuff") // disarm
		GPIS A 0 A_ReFire
		goto Ready
	Fire.Deconstruction:
		GPIS A 0 A_GunFlash
		GPIS A 0 A_PlayWeaponSound ("repairgun/fire")
		GPIS A 1 A_FireBullets (0, 0, 2, 500, "DeconstructionPuff")
		GPIS B 1 A_FireBullets (0, 0, 2, 500, "DeconstructionPuff")
		GPIS A 0 A_GunFlash
		GPIS A 0 A_PlayWeaponSound ("repairgun/fire")
		GPIS A 1 A_FireBullets (0, 0, 2, 500, "DeconstructionPuff")
		GPIS B 1 A_FireBullets (0, 0, 2, 500, "DeconstructionPuff")
		GPIS A 0 A_ReFire
		goto Ready
	AltFire:
		GPIS B 0 A_PlayWeaponSound ("switch/shotgun")
		GPIS B 4 ACS_ExecuteAlways (945, 0, 13)
		GPIS C 5
		goto Ready
	Flash:
		PISF A 1 Bright A_Light2
		PISF B 1 Bright A_Light1
		Goto LightDone
	} 
}

actor AdminPistolRotation : Inventory {inventory.maxamount 2}

actor Administrator : Player {
	+NOSKIN
	+INVULNERABLE
	+NODAMAGE
	+DONTTRANSLATE
	+FULLVOLDEATH
	-PICKUP
	-SHOOTABLE
	Health 1000000
	Player.MaxHealth 1000000
	Player.DisplayName "Administrator"
	Player.StartItem "Unarmed", 1
	Player.StartItem "IsAdmin", 1
	Player.ForwardMove 1.2
	Player.SideMove 1.2
	DeathSound "brain/death" // :V
	Player.MorphWeapon "AdminPistol"
}

actor AdministratorSwitch : PermanentPowerup {Powerup.Type "Administrator"}
actor PowerAdministrator : PowerMorph {
	PowerMorph.PlayerClass "Administrator"
	PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_ADDSTAMINA|MRF_NEWTIDBEHAVIOUR|MRF_WHENINVULNERABLE)
}

actor IsAdmin : Inventory {}

actor AdminFlight : PermanentPowerup {
	Powerup.Type "Flight"
}