Fix incorrect logic for spare armor auto-use.
This commit is contained in:
parent
37dd589c54
commit
06151e57bb
2 changed files with 3 additions and 3 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.28 r3 \cu(Wed 22 Jun 23:58:55 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.2.28 r3 \cu(2022-06-22 23:58:55)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.30 \cu(Thu 23 Jun 00:00:04 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.2.30 \cu(2022-06-23 00:00:04)\c-";
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ Class SWWMSpareArmor : Inventory abstract
|
|||
override bool Use( bool pickup )
|
||||
{
|
||||
let cur = Owner.FindInventory(giveme);
|
||||
if ( !cur || (!pickup && (cur.Amount < cur.MaxAmount)) || (GetDefaultByType(giveme).Amount+cur.Amount <= cur.MaxAmount) || ((default.MaxAmount > 0) && (cur.Amount < cur.MaxAmount)) )
|
||||
if ( !cur || (!pickup && (cur.Amount < cur.MaxAmount)) || (GetDefaultByType(giveme).Amount+cur.Amount <= cur.MaxAmount) || ((default.MaxAmount <= 0) && (cur.Amount < cur.MaxAmount)) )
|
||||
{
|
||||
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP);
|
||||
Owner.GiveInventory(giveme,GetDefaultByType(giveme).Amount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue