Fix incorrect logic for spare armor auto-use.
This commit is contained in:
parent
be96487e29
commit
bd45b022ff
2 changed files with 3 additions and 3 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r133 \cu(Wed 22 Jun 12:41:02 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r133 \cu(2022-06-22 12:41:02)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r134 \cu(Thu 23 Jun 00:02:42 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r134 \cu(2022-06-23 00:02:42)\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