swwmgz_m/zscript/dlc1/swwm_notashotgun.zsc

674 lines
18 KiB
Text

// Kmonn Shuna Quadravol (from UnSX series, not a Quadshot reskin anymore)
// Slot 6, spawns shared with Hellblazer
Class Quadravol : SWWMWeapon
{
int clipcount;
int chargelevel;
bool chambered, charged, waschambered, wascharged, fromfire;
bool onehand;
bool initialized;
Property ClipCount : clipcount;
transient ui Canvas AmmoLed;
ui TextureID AmmoLedBase, AmmoLedRound, AmmoLedCharge;
override void RenderTexture( RenderEvent e )
{
if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("QUADRLED");
if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/QuadLEDBase.png",TexMan.Type_Any);
if ( !AmmoLedRound ) AmmoLedRound = TexMan.CheckForTexture("models/QuadLEDRound.png",TexMan.Type_Any);
if ( !AmmoLedCharge ) AmmoLedCharge = TexMan.CheckForTexture("models/QuadLEDCharge.png",TexMan.Type_Any);
AmmoLed.Clear(0,0,64,64,0xFF101033);
AmmoLed.DrawTexture(AmmoLedBase,false,0,0,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,0xFF00FFFF);
Color col;
switch ( chargelevel )
{
default:
col = 0xFF00FF00;
break;
case 1:
case 9:
col = 0xFF0080FF;
break;
case 2:
case 8:
col = 0xFF0000FF;
break;
case 3:
case 7:
col = 0xFF8000FF;
break;
case 4:
case 6:
col = 0xFFFF0080;
break;
case 5:
col = 0xFFFF0000;
break;
}
AmmoLed.DrawTexture(AmmoLedCharge,false,12,4,DTA_SrcX,(chargelevel%4)*64,DTA_SrcY,(chargelevel/4)*64,DTA_SrcWidth,40,DTA_SrcHeight,40,DTA_DestWidth,40,DTA_DestHeight,40,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,col);
for ( int i=0; i<clipcount; i++ ) AmmoLed.DrawTexture(AmmoLedRound,false,36-8*i,52,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,0xFFFF8000);
if ( chambered ) AmmoLed.DrawTexture(AmmoLedRound,false,52,52,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,charged?0xFF404040:0xFFFF8000);
}
override bool ReportHUDAmmo()
{
return (chargelevel>0)||(chambered&&!charged)||(clipcount>0)||(Ammo1.Amount > 0);
}
override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount )
{
if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true;
if ( (firemode == PrimaryFire) || (firemode == EitherFire) )
{
if ( (chargelevel > 0) || (chambered && !charged) || (clipcount > 0) || (Ammo1.Amount > 0) ) return true;
if ( autoswitch ) PlayerPawn(Owner).PickNewWeapon(null);
return false;
}
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
}
override void PlayUpSound( Actor origin )
{
if ( onehand ) origin.A_StartSound("quadshot/selectfast",CHAN_WEAPON,CHANF_OVERLAP);
else origin.A_StartSound(UpSound,CHAN_WEAPON,CHANF_OVERLAP);
}
override Vector3 GetTraceOffset()
{
return onehand?(10,3.5,-2):(10,3,-2.5);
}
action State A_QuadFire( bool bMelee = false )
{
static const String BaseNum[] = {"one","two","three","four","five"};
static const StateLabel FireStates[] = {"FireOne","FireTwo","FireThree","FireFour","FireFive"};
static const StateLabel FireStates1H[] = {"FireOne1H","FireTwo1H","FireThree1H","FireFour1H","FireFive1H"};
int idx = clamp(invoker.chargelevel-1,0,4);
A_StartSound("quadshot/fire"..BaseNum[idx],CHAN_WEAPON,CHANF_OVERLAP);
A_PlayerFire();
Vector3 x, y, z;
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
double offy = invoker.onehand?3.5:3;
double offz = invoker.onehand?2:2.5;
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+offy*y-offz*z);
bool pointblank = false;
int rings = 1;
Vector3 dir;
FLineTraceData d;
Actor fool = null;
for ( double i=0; i<.16; i+=.04 )
{
for ( int j=0; j<360; j+=(360/rings) )
{
dir = SWWMUtility.ConeSpread(x,y,z,j,i);
pointblank |= LineTrace(atan2(dir.y,dir.x),60,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
if ( (d.HitType == TRACE_HitActor) && !fool ) fool = d.HitActor;
}
rings += 3;
}
Vector3 x2, y2, z2;
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
double a, s;
Actor p;
switch ( idx )
{
default:
A_QuakeEx(3,3,3,15,0,10,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.4);
A_BumpFOV(.98);
A_SWWMFlash();
SWWMHandler.DoFlash(self,Color(64,255,192,64),5);
A_AlertMonsters(swwm_uncapalert?0:2000);
SWWMUtility.DoKnockback(self,-x,1500.);
p = Spawn("QuadProj",origin);
p.target = self;
p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z);
p.vel = x2*p.speed;
if ( pointblank || bMelee )
{
p.tracer = self;
p.master = fool;
p.special1 += bMelee?100:50;
p.special2 += bMelee?120000:40000;
p.bAMBUSH = bMelee;
p.ExplodeMissile(null,null);
self.DamageMobj(invoker,self,bMelee?20:40,'Fire',DMG_EXPLOSION);
}
break;
case 1:
A_QuakeEx(4,4,4,18,0,10,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.5);
A_BumpFOV(.97);
A_SWWMFlash();
SWWMHandler.DoFlash(self,Color(64,255,192,64),7);
A_AlertMonsters(swwm_uncapalert?0:3000);
SWWMUtility.DoKnockback(self,-x,2500.);
p = Spawn("QuadProj2",origin);
p.target = self;
p.angle = atan2(x2.y,x2.x);
p.pitch = asin(-x2.z);
p.vel = x2*p.speed;
if ( pointblank || bMelee )
{
p.tracer = self;
p.master = fool;
p.special1 = bMelee?150:80;
p.special2 = bMelee?150000:60000;
p.bAMBUSH = bMelee;
p.ExplodeMissile(null,null);
self.DamageMobj(invoker,self,bMelee?20:40,'Fire',DMG_EXPLOSION);
}
break;
case 2:
A_Log("\cg// TODO - Fire Level 3\c-");
break;
case 3:
A_Log("\cg// TODO - Fire Level 4\c-");
break;
case 4:
if ( !invoker.charged ) A_Log("\cg// TODO - Fire Level 5+\c-");
else A_Log("\cg// TODO - Fire Level 5\c-");
break;
}
for ( int i=0; i<(4+idx); i++ )
{
let s = Spawn("SWWMSmoke",origin);
s.special1 = 1;
s.scale *= 1.3;
s.alpha *= .2;
s.vel += vel*.5+x*FRandom[Quadravol](5.,15.)+y*FRandom[Quadravol](-.5,.5)+z*FRandom[Quadravol](-.5,.5);
s.vel *= 1.+.1*idx;
}
for ( int i=0; i<(10+2*idx); i++ )
{
let s = Spawn("SWWMSpark",origin);
s.scale *= .3;
s.alpha *= .4;
s.vel += vel*.5+x*FRandom[Quadravol](4.,8.)+y*FRandom[Quadravol](-1.,1.)+z*FRandom[Quadravol](-1.,1.);
s.vel *= 1.+.1*idx;
}
invoker.chargelevel = 0;
invoker.charged = true; // eat it up
if ( bMelee ) return ResolveState(null);
return invoker.onehand?ResolveState(FireStates1H[idx]):ResolveState(FireStates[idx]);
}
action void A_Eject()
{
invoker.waschambered = invoker.chambered;
invoker.wascharged = invoker.charged;
invoker.chambered = (invoker.clipcount>0);
invoker.clipcount = max(0,invoker.clipcount-1);
invoker.charged = false;
if ( invoker.waschambered )
{
A_ChangeModel("",2,"","",5,"models",invoker.wascharged?"QuadCell_Used.png":"QuadCell.png",CMDL_USESURFACESKIN,-1);
if ( invoker.onehand ) A_Overlay(PSP_WEAPON+1,"DropCasing1H");
else A_Overlay(PSP_WEAPON+1,"DropCasing");
}
}
action void A_LoadOverlay()
{
A_PlayerReload(true);
A_StartSound("demolitionist/handsdown",CHAN_WEAPON,CHANF_OVERLAP,.8);
A_ChangeModel("",2,"","",5,"models","QuadCell.png",CMDL_USESURFACESKIN,-1);
A_Overlay(PSP_WEAPON+1,"LoadOverlay");
}
action void A_Load()
{
A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP,.3);
invoker.clipcount = min(invoker.default.clipcount,invoker.clipcount+1);
if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) )
invoker.Ammo1.Amount = max(0,invoker.Ammo1.Amount-1);
}
action bool A_Fill()
{
if ( !invoker.chambered || invoker.charged || (invoker.chargelevel >= 5) ) return false;
invoker.charged = true;
invoker.chargelevel++;
return true;
}
action void A_DropCasing()
{
Vector3 x, y, z;
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),-8*x+8*y-16*z);
if ( invoker.wascharged )
{
let c = Spawn("QuadravolCasing",origin);
c.angle = angle;
c.pitch = pitch-90;
c.vel = x*FRandom[Junk](-2.5,-1.5)+y*FRandom[Junk](.5,1.)-(0,0,FRandom[Junk](2.,5.));
c.vel += vel*.5;
return;
}
if ( invoker.Ammo1.Amount >= invoker.Ammo1.MaxAmount )
{
let a = Inventory(Spawn("QuadravolAmmo",origin));
a.bDROPPED = true;
a.DropTime = 30;
a.bSpecial = a.bSolid = false;
a.Angle = Angle+190;
a.VelFromAngle(5.);
a.Vel.Z = -1.;
a.Vel += Vel;
a.bNoGravity = false;
a.ClearCounters();
a.OnDrop(self);
a.vel += (RotateVector((FRandom[Junk](-1.5,.5),FRandom[Junk](-1.5,1.5)),a.angle),FRandom[Junk](-1.5,1.5));
return;
}
invoker.Ammo1.Amount++;
}
action void A_FireBayonet()
{
A_StartSound("quadshot/bayonetfire",CHAN_WEAPON,CHANF_OVERLAP);
A_Melee(60,"spreadgun/slug",1.5,.6,-.2,MELEE_Rip|MELEE_FleshSound|MELEE_NoRage|MELEE_NoUse,null);
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch);
vel += dir*4.;
A_QuakeEx(4,4,4,8,0,10,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,rollIntensity:.75);
A_BumpFOV(1.03);
}
override bool PickupForAmmoSWWM( SWWMWeapon ownedWeapon )
{
bool good = Super.PickupForAmmoSWWM(ownedWeapon);
let Owner = ownedWeapon.Owner;
if ( (AmmoGive1 == 0) && ((clipcount > 0) || (chambered && !charged)) )
{
// let's get this bread
Inventory cur = Owner.FindInventory(AmmoType1);
if ( !cur )
{
cur = Inventory(Spawn(AmmoType1));
cur.Amount = 0;
cur.AttachToOwner(Owner);
}
int ingun = clipcount+(chambered&&!charged);
int maxgiveamt = min(cur.MaxAmount-cur.Amount,ingun);
int dropamt = ingun-maxgiveamt;
if ( dropamt > 0 ) cur.CreateTossable(dropamt);
cur.Amount = min(cur.MaxAmount,cur.Amount+ingun);
good = true;
}
return good;
}
override void AttachToOwner( Actor other )
{
if ( !initialized )
{
initialized = true;
charged = false;
chambered = false;
clipcount = default.AmmoGive1; // match the ammo that the pickup should give
}
Super.AttachToOwner(other);
}
Default
{
Tag "$T_QUADRAVOL";
Inventory.PickupMessage "$I_QUADRAVOL";
Obituary "$O_QUADRAVOL";
SWWMWeapon.Tooltip "$TT_QUADRAVOL";
SWWMWeapon.GetLine "getquadravol";
Weapon.SlotNumber 6;
Weapon.SlotPriority 2.;
Weapon.SelectionOrder 650;
Weapon.UpSound "quadshot/select";
Weapon.AmmoType1 "QuadravolAmmo";
Weapon.AmmoGive1 3;
SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall";
Quadravol.ClipCount 5;
Stamina 80000;
+SWWMWEAPON.NOFIRSTGIVE;
+SWWMWEAPON.HASSCRTEX;
+WEAPON.EXPLOSIVE;
Radius 28;
Height 32;
}
States
{
Spawn:
XZW1 A -1;
Stop;
Select:
XZW2 R 1
{
A_FullRaise();
return A_JumpIf(invoker.onehand,"Select1H");
}
XZW2 STUVWXYZ 1;
XZW3 ABCDEFGHI 1;
XZW3 JKLMN 2;
Goto Ready;
Ready:
XZW2 A 1
{
A_Fill(); // just in case
int flg = WRF_ALLOWRELOAD|WRF_ALLOWUSER1|WRF_ALLOWZOOM;
if ( (invoker.chargelevel <= 0) && (invoker.Ammo1.Amount <= 0) && (invoker.clipcount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) flg |= WRF_NOPRIMARY;
invoker.fromfire = false;
A_WeaponReady(flg);
if ( player.cmd.buttons&BT_ATTACK )
invoker.CheckAmmo(EitherFire,true);
}
Wait;
Fire:
XZW2 A 1
{
if ( invoker.chargelevel <= 0 )
{
if ( invoker.clipcount > 0 ) return ResolveState("AltFire");
invoker.fromfire = true;
return ResolveState("Reload");
}
return A_QuadFire();
}
FireOne:
XZW2 A 1;
XZW3 OPQR 1;
XZW3 STUV 2;
Goto Ready;
FireTwo:
XZW2 A 1;
XZW3 WX 1;
XZW3 YZ 2;
XZW4 ABCD 3;
Goto Ready;
FireThree:
XZW2 A 1;
XZW4 EFGH 2;
XZW4 IJKL 3;
Goto Ready;
FireFour:
XZW2 A 1;
XZW4 MNOP 2;
XZW4 QR 3;
XZW4 ST 4;
Goto Ready;
FireFive:
XZW2 A 1;
XZW4 UV 2;
XZW4 WX 3;
XZW4 YZ 4;
XZW5 AB 5;
Goto Ready;
AltFire:
XZW2 A 2
{
A_PlayerCheckGun();
return A_JumpIf(invoker.onehand,"AltFire1H");
}
XZW5 C 2;
XZW5 D 2 A_StartSound("quadshot/leverforward",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 E 2 A_Eject();
XZW5 FG 3;
XZW5 H 2 A_StartSound("quadshot/leverback",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 I 2;
XZW5 J 2 A_Fill();
XZW5 K 2;
XZW5 L 2;
Goto Ready;
DropCasing:
XZWZ ABCDEF 2;
XZWZ G 0;
TNT1 A 1 A_DropCasing();
Stop;
Reload:
XZW2 A 2
{
if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) )
return invoker.onehand?ResolveState("Idle1H"):ResolveState("Idle");
if ( invoker.onehand ) return ResolveState("Reload1H");
A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP);
return ResolveState(null);
}
XZW5 MNO 3;
Goto ReloadHold;
ReloadHold:
XZW5 P 2 A_LoadOverlay();
XZW5 QRS 2;
XZW5 T 2 A_StartSound("quadshot/load",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 UV 2;
XZW5 W 2 A_Load();
XZW5 XYZ 2;
XZW6 A 2;
XZW5 P 2
{
if ( (invoker.clipcount >= invoker.default.clipcount) || ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) )
return A_JumpIf(invoker.onehand,"ReloadEnd1H");
if ( invoker.fromfire && (player.cmd.buttons&BT_ATTACK) )
return ResolveState("ReloadHold");
invoker.fromfire = false;
if ( player.cmd.buttons&BT_RELOAD ) return ResolveState("ReloadHold");
return A_JumpIf(invoker.onehand,"ReloadEnd1H");
}
XZW6 B 2 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP);
XZW6 CDEF 2;
XZW6 GHIJK 3;
Goto Ready;
LoadOverlay:
XZWZ HIJKLMN 2;
XZWZ O 0;
Stop;
Idle:
XZW2 A 2 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP,.8);
XZW6 LMNO 2;
XZW6 PQRST 3;
XZW6 U 2 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP,.6);
XZW6 VW 2;
XZW6 XYZ 3;
XZW7 A 3;
Goto Ready;
Zoom:
XZW2 A 2
{
if ( invoker.onehand )
{
invoker.onehand = false;
return ResolveState("Zoom1H");
}
A_StartSound("quadshot/onehand",CHAN_WEAPON,CHANF_OVERLAP);
invoker.onehand = true;
return ResolveState(null);
}
XZW8 Z 2;
XZW9 ABCDEF 2;
Goto Ready1H;
User1:
XZW2 A 2
{
A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.onehand,"User11H");
}
XZW7 BCD 2;
XZW7 E 2
{
A_PlayerMelee();
A_StartSound("demolitionist/wswing",CHAN_WEAPON,CHANF_OVERLAP);
}
XZW7 FG 2;
XZW7 H 2 A_Parry(6);
XZW7 I 1;
XZW7 J 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet");
XZW7 KLM 1;
XZW7 NOPQRST 2;
XZW7 UVWX 3;
Goto Ready;
Bayonet:
XZW7 J 1 A_FireBayonet();
XZW7 YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire");
XZW8 ABC 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire");
XZW8 D 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZW8 EFGH 1;
XZW8 IJKL 2;
Goto Ready;
BayonetFire:
#### # 1 A_QuadFire(true);
XZW8 MNO 1;
XZW8 P 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZW8 QRST 1;
XZW8 UVWXY 2;
Goto Ready;
Deselect:
XZW2 A 1
{
A_StartSound(invoker.onehand?"quadshot/deselectfast":"quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP);
return A_JumpIf(invoker.onehand,"Deselect1H");
}
XZW2 BCDEFGHIJKLMNOPQR 1;
XZW2 R -1 A_FullLower();
Stop;
Flash:
XZW0 A 2 Bright
{
let psp = player.GetPSprite(PSP_FLASH);
psp.frame = Random[GunFlash](0,9)+invoker.onehand*10;
let l = Spawn("SWWMWeaponLight",pos);
l.target = self;
}
Stop;
// one-handed states
Select1H:
XZW9 N 2 A_FullRaise();
XZW9 OPQRSTUVW 2;
Goto Ready1H;
Ready1H:
XZW9 G 1
{
A_Fill(); // just in case
int flg = WRF_ALLOWRELOAD|WRF_ALLOWUSER1|WRF_ALLOWZOOM;
if ( (invoker.chargelevel <= 0) && (invoker.Ammo1.Amount <= 0) && (invoker.clipcount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) ) flg |= WRF_NOPRIMARY;
invoker.fromfire = false;
A_WeaponReady(flg);
if ( player.cmd.buttons&BT_ATTACK )
invoker.CheckAmmo(EitherFire,true);
}
Wait;
FireOne1H:
XZW9 G 1;
XZW9 XYZ 1;
XZWA A 1;
XZWA BCDE 2;
Goto Ready1H;
FireTwo1H:
XZW9 G 1;
XZWA FG 1;
XZWA HI 2;
XZWA JKLM 3;
Goto Ready1H;
FireThree1H:
XZW9 G 1;
XZWA NOPQ 2;
XZWA RSTU 3;
Goto Ready1H;
FireFour1H:
XZW9 G 1;
XZWA VWXY 2;
XZWA Z 3;
XZWB A 3;
XZWB BC 4;
Goto Ready1H;
FireFive1H:
XZW9 G 1;
XZWB DE 2;
XZWB FG 3;
XZWB HI 4;
XZWB JK 5;
Goto Ready1H;
AltFire1H:
XZW9 G 2;
XZWB L 2;
XZWB M 1
{
A_StartSound("quadshot/leverforward",CHAN_WEAPON,CHANF_OVERLAP);
A_Eject();
}
XZWB NO 1;
XZWB P 2 A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP,pitch:.6);
XZWB QR 2;
XZWB S 2 A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP,pitch:.5);
XZWB TUV 2;
XZWB W 2 A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP,pitch:.4);
XZWB XY 1;
XZWB Z 1 A_StartSound("quadshot/leverback",CHAN_WEAPON,CHANF_OVERLAP);
XZWC A 2;
XZWC B 2 A_Fill();
XZWC CDEF 3;
Goto Ready1H;
DropCasing1H:
XZWZ PQRSTUVW 1;
XZWZ X 0;
TNT1 A 1 A_DropCasing();
Stop;
Idle1H:
XZW9 G 2 A_StartSound("demolitionist/handsup",CHAN_WEAPON,CHANF_OVERLAP,.8);
XZWC JKLM 2;
XZWC NOPQR 3;
XZWC STU 2;
XZWC VWX 3;
XZWC Y 3;
Goto Ready1H;
Zoom1H:
XZW9 G 2;
XZWE XYZ 2;
XZWF AB 2;
XZWF C 1 A_StartSound("quadshot/twohand",CHAN_WEAPON,CHANF_OVERLAP);
XZWF DEFG 1;
XZWF HIJKL 2;
Goto Ready;
User11H:
XZW9 G 2;
XZWC Z 2;
XZWD AB 2;
XZWD C 2
{
A_PlayerMelee();
A_StartSound("demolitionist/wswing",CHAN_WEAPON,CHANF_OVERLAP);
}
XZWD DE 2;
XZWD F 2 A_Parry(6);
XZWD G 1;
XZWD H 1 A_JumpIf(A_Melee(20,"demolitionist/whitm",1.2,.6,.2),"Bayonet1H");
XZWD IJK 1;
XZWD LMNOPQR 2;
XZWD STUV 3;
Goto Ready1H;
Bayonet1H:
XZWD H 1 A_FireBayonet();
XZWD WX 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H");
XZWD YZ 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H");
XZWE A 2 A_JumpIf((player.cmd.buttons&BT_ATTACK)&&(invoker.chargelevel>0),"BayonetFire1H");
XZWE B 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZWE CDEF 1;
XZWE GHIJ 2;
Goto Ready1H;
BayonetFire1H:
#### # 1 A_QuadFire(true);
XZWE KLM 1;
XZWE N 1 A_StartSound("quadshot/bayonetreturn",CHAN_WEAPON,CHANF_OVERLAP);
XZWE OPQR 1;
XZWE STUVW 2;
Goto Ready1H;
Deselect1H:
XZW9 GHIJKLM 2;
XZW9 N -1 A_FullLower();
Stop;
Reload1H:
XZW9 G 2;
XZWC G 3;
Goto ReloadHold;
ReloadEnd1H:
XZW5 P 2;
XZWC HI 3;
Goto Ready1H;
}
}