diff --git a/language.version b/language.version index 9ae150fdc..ad03c10dd 100644 --- a/language.version +++ b/language.version @@ -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)"; diff --git a/modeldef.wallbuster b/modeldef.wallbuster index 8e2a17f77..933805365 100644 --- a/modeldef.wallbuster +++ b/modeldef.wallbuster @@ -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 } diff --git a/models/Wallbuster1st.blend b/models/Wallbuster1st.blend index 571dfdde0..c3cfa222c 100644 Binary files a/models/Wallbuster1st.blend and b/models/Wallbuster1st.blend differ diff --git a/models/Wallbuster1st_a.3d b/models/Wallbuster1st_a.3d index b5bf9c71b..23efcc17e 100644 Binary files a/models/Wallbuster1st_a.3d and b/models/Wallbuster1st_a.3d differ diff --git a/models/Wallbuster1st_d.3d b/models/Wallbuster1st_d.3d index d7e084762..1c87450da 100644 Binary files a/models/Wallbuster1st_d.3d and b/models/Wallbuster1st_d.3d differ diff --git a/zscript/swwm_cbt.zsc b/zscript/swwm_cbt.zsc index 702ce72ea..05aef5102 100644 --- a/zscript/swwm_cbt.zsc +++ b/zscript/swwm_cbt.zsc @@ -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;