Wallbuster is now hold-to-reload.

This commit is contained in:
Mari the Deer 2024-01-22 21:00:43 +01:00
commit 997823dd27
8 changed files with 11 additions and 31 deletions

View file

@ -7,7 +7,6 @@ Class Wallbuster : SWWMWeapon
bool fired[25];
int rotation[6];
int whichspin;
transient bool cancelreload;
override void DoEffect()
{
@ -577,8 +576,6 @@ Class Wallbuster : SWWMWeapon
XZW4 W 0
{
int rnum = GetShellsToLoad();
invoker.cancelreload = false;
A_Overlay(-9999,"CheckCancelReload");
// if it's a full rotation, don't hand-spin
if ( rnum > 20 ) return ResolveState(null);
// jump to spin if current group is full
@ -626,12 +623,7 @@ Class Wallbuster : SWWMWeapon
XZWE UVWXY 1;
DetachSpinReturn:
XZWE Z 1;
XZWF A 2
{
invoker.cancelreload = false;
A_Overlay(-9999,"CheckCancelReload");
A_HandSpin();
}
XZWF A 2 A_HandSpin();
XZWF BCDEFG 2;
XZWF J 1 A_StartSound("wallbuster/detach",CHAN_WEAPON,CHANF_OVERLAP);
XZWF K 0;
@ -657,18 +649,11 @@ Class Wallbuster : SWWMWeapon
XZW6 C 2 A_LoadShell();
XZW6 E 0
{
int rnum = invoker.cancelreload?0:GetShellsToLoad();
int rnum = (player.cmd.buttons&BT_RELOAD)?GetShellsToLoad():0;
player.SetPSprite(-9999,null);
return A_JumpIf(rnum,"AttachSpin");
}
Goto Attach;
CheckCancelReload:
TNT1 A 1
{
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK|BT_RELOAD|BT_ZOOM|BT_USER1) )
invoker.cancelreload = true;
}
Wait;
Attach:
XZW6 EF 2;
XZW6 G 1 A_StartAttachOverlays();
@ -687,12 +672,7 @@ Class Wallbuster : SWWMWeapon
XZW7 TUVW 1;
XZW7 XYZ 1;
XZW8 ABC 1;
XZW8 D 2
{
invoker.cancelreload = false;
A_Overlay(-9999,"CheckCancelReload");
A_HandSpin();
}
XZW8 D 2 A_HandSpin();
XZW8 EFGHIL 2;
XZW8 M 1 A_StartSound("wallbuster/detach",CHAN_WEAPON,CHANF_OVERLAP);
XZW8 N 0;