actor OnslaughtGatlingWep_NormalBar : NormalBar{args 87,178}
actor OnslaughtGatlingWep_ScriptBar : ScriptBar {}
actor OnslaughtGatlingWep : BaseMM8BDMWep
{
dropitem "OnslaughtGatlingWep"
Weapon.AmmoUse 1
Weapon.AmmoGive 30
Weapon.SlotNumber 6
Inventory.Pickupmessage "$PU_ONSLAUGHTGATLING"
Obituary "$OB_ONSLAUGHTGATLING"
Tag "$TAG_ONSLAUGHTGATLING"
weapon.ammotype "OnslaughtGatlingAmmo"
inventory.icon "ONSGICON"
States
{
SpawnLoop:
ONSG Z 1
loop
Ready:
ONSG A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_ONSLAUGHTGATLING)
ONSG A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
ONSG A 0 
goto DeselectSwap
Select:
ONSG A 0
goto SelectSwap
Fire:
ONSG A 0 A_JumpIfNoAmmo("Altfire")
ONSG A 1 Offset(0,42)A_PlaySoundEx("misc/fakereloadshort", "Weapon")
ONSG A 1 Offset(0,62)
ONSG A 1 Offset(0,82)
ONSG B 2 Offset(0,82)
Loading:
ONSG B 0 A_PlaySoundEx("misc/door", "Weapon")
ONSG B 0 A_TakeInventory("OnslaughtGatlingAmmo",1,TIF_NOTAKEINFINITE)
ONSG B 0 A_GiveInventory("OnslaughtGatlingLoad",1)
ONSG B 1 Offset(0,88)
ONSG B 2 Offset(0,82)
ONSG B 0 A_JumpIfNoAmmo("LoadingDone")
ONSG B 0 A_JumpIfInventory("OnslaughtGatlingLoad",30,"LoadingDone") //in the event of infinite ammo
ONSG B 0 A_Refire("Loading")
goto ReleasePrelude
LoadingDone:
ONSG B 1 Offset(0,82)
ONSG B 1 Offset(0,62)
ONSG B 1 Offset(0,42)
ONSG B 0 A_JumpIfInventory("IsBot", 1, "Release")
ONSG B 1 A_WeaponReady(14)
HoldingCharge:
ONSG B 1 A_WeaponReady(14)
ONSG B 1 A_Refire("HoldingCharge")
Release:
ONSG B 0 A_GiveInventory("OnslaughtGatlingSlow",1)
ONSG B 0 A_PlaySoundEx("weapon/coilexplode","Weapon")
ONSG B 0 A_TakeInventory("OnslaughtGatlingLoad",1)
ONSG B 0 A_FireCustomMissile("OnslaughtGatling",0,0,8,0)
ONSG BBB 0 A_FireCustomMissile("OnslaughtGatling",frandom(-8,8),0,8,0)
ONSG B 1 ACS_NamedExecute("vile_statechange",0,2)
ONSG C 1 ACS_NamedExecute("vile_statechange",0,2)
ONSG B 0 A_JumpIfInventory("OnslaughtGatlingLoad",1,"Release")
ONSG B 0 A_TakeInventory("OnslaughtGatlingSlow",1)
ONSG BBBBAAAAAAAA 1 A_WeaponReady(WRF_NOFIRE)
ONSG A 2 A_WeaponReady
Goto Ready+1
Altfire:
ONSG B 0 A_JumpIfInventory("IsBot", 1, "BotFire")
ONSG B 0 A_PlaySoundEx("weapon/coilexplode","Weapon")
ONSG B 0 A_FireCustomMissile("OnslaughtGatling",0,0,8,0)
ONSG B 3
ONSG C 8
ONSG A 7
Goto Ready+1
Botfire:
ONSG B 0 A_PlaySoundEx("weapon/coilexplode","Weapon")
ONSG B 0 A_FireCustomMissile("OnslaughtGatling",0,0,8,0)
ONSG B 3
ONSG C 8
ONSG A 6
ONSG A 1 A_Refire("BotFire")
ONSG B 0 ACS_Execute(979,0)
Goto Ready+1
NoAmmo:
ONSG A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
ReleasePrelude:
ONSG B 1 Offset(0,82)
ONSG B 1 Offset(0,62)
ONSG B 1 Offset(0,42)
goto Release
}
}

actor OnslaughtGatlingAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 30
+INVENTORY.IGNORESKILL
}

Actor OnslaughtGatlingLoad : OilSliderFlag {}
actor OnslaughtGatlingSlow : PowerSpeed { Speed 0.34 }
actor OnslaughtGatling : BasicFastProjectile
{
translation "208:208=87:87", "216:220=178:178"
damagetype "OnslaughtGatling"
PROJECTILE
Speed 50
damage (CallACS("vile_cbm_damage",4))
Obituary "$OB_ONSLAUGHTGATLING"
Height 8
Radius 8
Scale 2.5
States
{
Spawn:
DARS D 0 
DARS D 3 
Spawn2:
DARS D 1 A_SpawnItemEx("OnslaughtGatlingFX")
loop
}
}
actor OnslaughtGatlingFX : BasicGraphicEffect
{
translation "208:208=87:87", "216:220=178:178"
renderstyle translucent
alpha 0.90
Scale 2.5
states
{
SpawnFrame:
TNT1 AA 1
Spawn2:
DARS D 0 A_SetScale(scaleX-0.3)
DARS D 1 A_FadeOut(0.08)
loop
Death:
TNT1 A 0
stop
}
}