Wallbuster unload function fixes.

This commit is contained in:
Mari the Deer 2021-01-20 11:00:17 +01:00
commit f7dc7ce222
6 changed files with 44 additions and 4 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r769 \cu(Tue 19 Jan 19:11:09 CET 2021)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r770 \cu(Wed 20 Jan 11:00:17 CET 2021)";

View file

@ -730,4 +730,8 @@ Model "Wallbuster"
FrameIndex XZWH J 1 238 // identical to 234, but unrotated
FrameIndex XZWH K 1 239
FrameIndex XZWH L 1 240
// Attach+Spin InterSpin
FrameIndex XZWH M 1 242 // identical to 172, but unrotated
FrameIndex XZWH N 1 243
FrameIndex XZWH O 1 244
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1807,7 +1807,9 @@ Class Wallbuster : SWWMWeapon
Goto DetachHold;
DetachSpin:
XZWE U 0;
XZWE VWXYZ 1;
XZWE VWXY 1;
DetachSpinReturn:
XZWE Z 1;
XZWF A 2
{
invoker.cancelreload = false;
@ -1850,7 +1852,7 @@ Class Wallbuster : SWWMWeapon
XZWF G 2;
XZWF H 0;
XZWH JKL 1;
Goto DetachSpin+5;
Goto DetachSpinReturn;
DetachHold:
XZW5 H 1
{
@ -1958,10 +1960,44 @@ Class Wallbuster : SWWMWeapon
A_Overlay(-9999,"CheckCancelReload");
A_HandSpin();
}
XZW8 EFGHIL 2;
XZW8 EFGH 2;
XZW8 I 0
{
if ( invoker.clearout )
{
// jump to spin again if current group is empty
bool hasshells = false;
for ( int i=0; i<5; i++ )
{
// get physical index
int idx = i;
// shift based on full rotation
idx = (idx+invoker.rotation[5]*5);
while ( idx > 24 ) idx -= 25;
int group = idx/5;
// shift based on group rotation
int gidx = i%5;
gidx = (gidx+invoker.rotation[group]);
while ( gidx > 4 ) gidx -= 5;
idx = gidx+group*5;
if ( !invoker.loaded[idx] || invoker.fired[idx] ) continue;
hasshells = true;
break;
}
if ( !hasshells ) return ResolveState("AttachSpinAgain");
}
return ResolveState(null);
}
XZW8 IL 2;
XZW8 M 1 A_StartSound("wallbuster/detach",CHAN_WEAPON,CHANF_OVERLAP);
XZW8 N 0;
Goto DetachHold;
AttachSpinAgain:
XZW8 IJ 2;
XZW8 K 1;
XZW8 K 0;
XZWH MNO 1;
Goto DetachSpinReturn;
AttachShell0:
XZWA OPQRSTUVWXYZ 1;
XZWB AB 1;