From 1b20c92ca51b5b6ca21bf02b034d8e2ca4cc23e9 Mon Sep 17 00:00:00 2001 From: Boondorl Date: Fri, 16 Aug 2024 18:26:11 -0400 Subject: [PATCH] Fixed counters not clearing when using shared/local pickups --- wadsrc/static/zscript/actors/inventory/inventory.zs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wadsrc/static/zscript/actors/inventory/inventory.zs b/wadsrc/static/zscript/actors/inventory/inventory.zs index 2e6544093..0ca6faf3e 100644 --- a/wadsrc/static/zscript/actors/inventory/inventory.zs +++ b/wadsrc/static/zscript/actors/inventory/inventory.zs @@ -281,6 +281,7 @@ class Inventory : Actor if (!item || item == self) continue; + item.ClearCounters(); item.bSharingItem = true; item.bDropped = item.bNeverLocal = true; if (!item.CallTryPickup(players[i].mo)) @@ -847,6 +848,8 @@ class Inventory : Actor return; localPickUp = give != self; + if (localPickUp) + give.ClearCounters(); } bool res; @@ -1124,6 +1127,7 @@ class Inventory : Actor int pNum = client.PlayerNumber(); pickedUp[pNum] = true; DisableLocalRendering(pNum, true); + bCountItem = bCountSecret = false; } // Force spawn a new version of the item. This needs to use CreateCopy so that