Fix COUNTITEM handling of Hammerspace Embiggener.

This commit is contained in:
Mari the Deer 2021-02-21 20:45:03 +01:00
commit b90a3c91b9
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r293 \cu(Sun 21 Feb 18:01:02 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r293 \cu(2021-02-21 18:01:02)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r294 \cu(Sun 21 Feb 20:45:03 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r294 \cu(2021-02-21 20:45:03)\c-";

View file

@ -1750,6 +1750,7 @@ Class HammerspaceEmbiggener : Inventory
{
if ( !GoAway() ) Destroy();
let copy = Inventory(Spawn('HammerspaceEmbiggener'));
copy.ClearCounters();
copy.Amount = self.Amount;
copy.MaxAmount = self.MaxAmount;
return copy;
@ -1757,6 +1758,7 @@ Class HammerspaceEmbiggener : Inventory
if ( GoAway() )
{
let copy = Inventory(Spawn(GetClass()));
copy.ClearCounters();
copy.Amount = self.Amount;
copy.MaxAmount = self.MaxAmount;
return copy;
@ -1828,6 +1830,7 @@ Class HammerspaceEmbiggener : Inventory
let t = bt.Thing;
if ( !t || (t == self) || !(t is 'HammerspaceEmbiggener') || !(t.spawnpoint ~== spawnpoint) ) continue;
tamount += HammerspaceEmbiggener(t).Amount;
t.ClearCounters();
t.Destroy();
}
if ( tamount <= 1 ) return;
@ -1858,6 +1861,7 @@ Class HammerspaceEmbiggener : Inventory
n.tracer = tracer;
n.target = target;
if ( !bDROPPED ) n.bDROPPED = false;
ClearCounters();
Destroy();
}