Fixed CreateCopy being broken on HexenArmor

This commit is contained in:
Boondorl 2024-11-08 17:34:26 -05:00 committed by Ricardo Luís Vaz Silva
parent 220200d836
commit 04cdbd1898

View file

@ -468,11 +468,12 @@ class HexenArmor : Armor
override Inventory CreateCopy (Actor other) override Inventory CreateCopy (Actor other)
{ {
// Like BasicArmor, HexenArmor is used in the inventory but not the map. // Unlike BasicArmor, Hexen's armor pieces directly inherit from this class.
// health is the slot this armor occupies. // Health is the slot this armor occupies.
// Amount is the quantity to give (0 = normal max). // Amount is the quantity to give (0 = normal max).
let copy = HexenArmor(Spawn(GetHexenArmorClass())); let copy = HexenArmor(Spawn(GetClass()));
copy.AddArmorToSlot (health, Amount); copy.Health = Health;
copy.Amount = Amount;
GoAwayAndDie (); GoAwayAndDie ();
return copy; return copy;
} }