From fdd2a90545c8f11fadf8a4b9bf751daaa157f51c Mon Sep 17 00:00:00 2001 From: Boondorl Date: Fri, 14 Feb 2025 13:20:03 -0500 Subject: [PATCH] Fixed ammo and backpack with local items on Now avoids duplicate calling CreateCopy --- wadsrc/static/zscript/actors/inventory/ammo.zs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wadsrc/static/zscript/actors/inventory/ammo.zs b/wadsrc/static/zscript/actors/inventory/ammo.zs index 8c9a4385e..f260d8b24 100644 --- a/wadsrc/static/zscript/actors/inventory/ammo.zs +++ b/wadsrc/static/zscript/actors/inventory/ammo.zs @@ -138,6 +138,9 @@ class Ammo : Inventory override Inventory CreateCopy (Actor other) { + if (IsCreatingLocalCopy()) + return Super.CreateCopy(other); + Inventory copy; int amount = Amount; @@ -250,6 +253,9 @@ class BackpackItem : Inventory override Inventory CreateCopy (Actor other) { + if (IsCreatingLocalCopy()) + return Super.CreateCopy(other); + // Find every unique type of ammoitem. Give it to the player if // he doesn't have it already, and double its maximum capacity. uint end = AllActorClasses.Size();