Fix Eviscerator deselecting before last round is chambered.

Picked up Candy Gun spares will leave behind their mag if no more ammo can be held.
Mag Ammo max amounts tweaked again.
This commit is contained in:
Mari the Deer 2021-01-21 21:56:25 +01:00
commit 3811e15e22
5 changed files with 21 additions and 13 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r778 \cu(Thu 21 Jan 18:16:09 CET 2021)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r779 \cu(Thu 21 Jan 21:56:25 CET 2021)";

View file

@ -246,8 +246,8 @@ Class RayBolt : MagAmmo
Inventory.Icon "graphics/HUD/Icons/A_RayBolt.png";
MagAmmo.ParentAmmo "RayAmmo";
MagAmmo.ClipSize 20;
Inventory.MaxAmount 21;
Inventory.InterHubAmount 21;
Inventory.MaxAmount 25;
Inventory.InterHubAmount 25;
+FLOATBOB;
FloatBobStrength 0.25;
}
@ -326,8 +326,8 @@ Class GrandSpear : MagAmmo
Inventory.Icon "graphics/HUD/Icons/A_GrandSpear.png";
MagAmmo.ParentAmmo "GrandAmmo";
MagAmmo.ClipSize 5;
Inventory.MaxAmount 6;
Inventory.InterHubAmount 6;
Inventory.MaxAmount 8;
Inventory.InterHubAmount 8;
+FLOATBOB;
FloatBobStrength 0.25;
}

View file

@ -1159,8 +1159,8 @@ Class SilverBullets : MagAmmo
Inventory.Icon "graphics/HUD/Icons/A_SilverBulletBullet.png";
MagAmmo.ParentAmmo "SilverBulletAmmo";
MagAmmo.ClipSize 5;
Inventory.MaxAmount 6;
Inventory.InterHubAmount 6;
Inventory.MaxAmount 8;
Inventory.InterHubAmount 8;
+FLOATBOB;
FloatBobStrength 0.25;
Radius 4;
@ -1182,8 +1182,8 @@ Class SilverBullets2 : MagAmmo
Inventory.Icon "graphics/HUD/Icons/A_SilverBulletBullet2.png";
MagAmmo.ParentAmmo "SilverBulletAmmo2";
MagAmmo.ClipSize 5;
Inventory.MaxAmount 6;
Inventory.InterHubAmount 6;
Inventory.MaxAmount 8;
Inventory.InterHubAmount 8;
+FLOATBOB;
FloatBobStrength 0.25;
Radius 4;
@ -1285,8 +1285,8 @@ Class CandyGunBullets : MagAmmo
Inventory.Icon "graphics/HUD/Icons/A_CandyBullet.png";
MagAmmo.ParentAmmo "CandyGunAmmo";
MagAmmo.ClipSize 7;
Inventory.MaxAmount 8;
Inventory.InterHubAmount 8;
Inventory.MaxAmount 10;
Inventory.InterHubAmount 10;
+FLOATBOB;
FloatBobStrength 0.25;
Radius 2;

View file

@ -978,7 +978,8 @@ Class Eviscerator : SWWMWeapon
invoker.pendingload = true;
}
A_WeaponReady(flg);
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) )
// avoid the check while still chambering
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) && (invoker.loadtics < 20) )
invoker.CheckAmmo(EitherFire,true);
}
Wait;
@ -995,7 +996,8 @@ Class Eviscerator : SWWMWeapon
invoker.pendingload = true;
}
A_WeaponReady(flg);
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) )
// avoid the check while still chambering
if ( player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK) && (invoker.loadtics < 20) )
invoker.CheckAmmo(EitherFire,true);
}
Wait;

View file

@ -919,6 +919,12 @@ Class CandyGun : SWWMWeapon
Console.Printf(StringTable.Localize(SWWMUtility.SellFemaleItem(item)?"$SWWM_SELLEXTRA_FEM":"$SWWM_SELLEXTRA"),Owner.player.GetUserName(),GetTag(),sellprice);
item.bPickupGood = true;
}
if ( spareget && !ammoget )
{
// leave the excess mag behind
let m = Spawn(AmmoType1,item.pos);
m.angle = item.angle;
}
return true;
}
return Super.HandlePickup(item);