diff --git a/README.md b/README.md index eac642fd8..d9c280cc6 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ Another signature weapon of the **SWWM** series. This time in its third and far **Secondary fire:** Lob the rocket as a grenade that will bounce around. Hold to load up to 2 additional grenades, then release for burst fire. You can tap the primary fire button at any time to cancel the preload and go straight to holding. -**Tertiary fire:** Change the ammo type, there are four options *(see ammo section below)*. While holding rockets, tap to select seek targets. +**Tertiary fire:** While holding rockets, tap to select seek targets. Otherwise, doesn't do much at all *(yet)*. **Reload:** Obviously does what you'd expect. If you're holding rockets and have targets locked on, tap to clear. diff --git a/language.version b/language.version index 96e2e5104..9abb6ec81 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r569 \cu(Wed 12 Oct 14:50:29 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r569 \cu(2022-10-12 14:50:29)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r569 \cu(Wed 12 Oct 23:28:02 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r569 \cu(2022-10-12 23:28:02)\c-"; diff --git a/zscript/weapons/swwm_cbt.zsc b/zscript/weapons/swwm_cbt.zsc index 249f37c96..b343908d1 100644 --- a/zscript/weapons/swwm_cbt.zsc +++ b/zscript/weapons/swwm_cbt.zsc @@ -151,6 +151,20 @@ Class Wallbuster : SWWMWeapon } action void A_FireShells( int num = 1 ) { + // auto-reload if we're fully empty and there's ammo to use + bool isloaded = false; + for ( int i=0; i<25; i++ ) + { + if ( !invoker.loaded[i] || invoker.fired[i] ) + continue; + isloaded = true; + break; + } + if ( !isloaded && (GetShellsToLoad() > 0) ) + { + player.SetPSprite(PSP_WEAPON,ResolveState("Reload")); + return; + } // speen if ( num == 1 ) invoker.whichspin = 1; else if ( num == 5 ) invoker.whichspin = 2; diff --git a/zscript/weapons/swwm_shot.zsc b/zscript/weapons/swwm_shot.zsc index ec1dfff63..80baaf5ae 100644 --- a/zscript/weapons/swwm_shot.zsc +++ b/zscript/weapons/swwm_shot.zsc @@ -381,11 +381,12 @@ Class Spreadgun : SWWMWeapon action State A_SpreadgunReady() { int flg = WRF_ALLOWZOOM|WRF_ALLOWUSER1|WRF_NOSECONDARY; - if ( ((invoker.Ammo1.Amount > 0) || sv_infiniteammo && FindInventory('PowerInfiniteAmmo',true)) && (invoker.fired || !invoker.chambered || invoker.goldload) ) + if ( ((invoker.Ammo1.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true)) && (invoker.fired || !invoker.chambered || invoker.goldload) ) flg |= WRF_ALLOWRELOAD; - if ( ((invoker.Ammo2.Amount > 0) || sv_infiniteammo && FindInventory('PowerInfiniteAmmo',true)) && (invoker.fired || !invoker.chambered || !invoker.goldload) ) + if ( ((invoker.Ammo2.Amount > 0) || sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true)) && (invoker.fired || !invoker.chambered || !invoker.goldload) ) flg &= ~WRF_NOSECONDARY; - if ( invoker.fired || !invoker.chambered ) flg |= WRF_NOPRIMARY; // until 1.4, dry-fire animation not implemented + if ( ((invoker.Ammo1.Amount <= 0) && !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true)) && (invoker.fired || !invoker.chambered) ) + flg |= WRF_NOPRIMARY; A_WeaponReady(flg); if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) ) invoker.CheckAmmo(EitherFire,true); @@ -530,6 +531,7 @@ Class Spreadgun : SWWMWeapon Fire: XZW2 A 1 { + if ( invoker.fired || !invoker.chambered ) return ResolveState("Reload"); A_FireShell(); return ResolveState(null); } diff --git a/zscript/weapons/swwm_thiccboolet.zsc b/zscript/weapons/swwm_thiccboolet.zsc index d8bb80d35..7e306f850 100644 --- a/zscript/weapons/swwm_thiccboolet.zsc +++ b/zscript/weapons/swwm_thiccboolet.zsc @@ -785,7 +785,6 @@ Class SilverBullet : SWWMWeapon XZW2 A 1 { int flg = WRF_ALLOWRELOAD|WRF_ALLOWZOOM|WRF_ALLOWUSER1; - if ( !invoker.chambered || invoker.fired ) flg |= WRF_NOPRIMARY; // no dry-fire yet A_WeaponReady(flg); if ( player.cmd.buttons&BT_ATTACK ) invoker.CheckAmmo(EitherFire,true); @@ -795,7 +794,6 @@ Class SilverBullet : SWWMWeapon TNT1 A 1 { int flg = WRF_ALLOWRELOAD|WRF_ALLOWUSER1; - if ( !invoker.chambered || invoker.fired ) flg |= WRF_NOPRIMARY; // no dry-fire yet if ( invoker.rezoom > 0 ) invoker.rezoom--; else flg |= WRF_ALLOWZOOM; A_WeaponReady(flg); @@ -806,6 +804,12 @@ Class SilverBullet : SWWMWeapon Fire: XZW2 A 1 { + if ( !invoker.chambered || invoker.fired ) + { + if ( !invoker.fired && (invoker.clipcount <= 0) && (sv_infiniteammo || FindInventory('PowerInfiniteAmmo',true) || (invoker.Ammo1.Amount > 0) || (CountInv("SilverBullets") > 0)) ) + return ResolveState("Reload"); + return ResolveState("AltFire"); + } A_SilverFire(); invoker.fired = true; return A_JumpIf(invoker.zoomed,"ZoomFire");