From 04cdbd1898f8e7240c4f02e4bd5da54217bd4758 Mon Sep 17 00:00:00 2001 From: Boondorl Date: Fri, 8 Nov 2024 17:34:26 -0500 Subject: [PATCH] Fixed CreateCopy being broken on HexenArmor --- wadsrc/static/zscript/actors/inventory/armor.zs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/zscript/actors/inventory/armor.zs b/wadsrc/static/zscript/actors/inventory/armor.zs index 8509c5bf2..29c82a1fc 100644 --- a/wadsrc/static/zscript/actors/inventory/armor.zs +++ b/wadsrc/static/zscript/actors/inventory/armor.zs @@ -468,11 +468,12 @@ class HexenArmor : Armor override Inventory CreateCopy (Actor other) { - // Like BasicArmor, HexenArmor is used in the inventory but not the map. - // health is the slot this armor occupies. + // Unlike BasicArmor, Hexen's armor pieces directly inherit from this class. + // Health is the slot this armor occupies. // Amount is the quantity to give (0 = normal max). - let copy = HexenArmor(Spawn(GetHexenArmorClass())); - copy.AddArmorToSlot (health, Amount); + let copy = HexenArmor(Spawn(GetClass())); + copy.Health = Health; + copy.Amount = Amount; GoAwayAndDie (); return copy; }