From 873c04b83cdfec8e797e3dd3712e82d533786c6c Mon Sep 17 00:00:00 2001 From: SuperCake Date: Wed, 18 Feb 2026 18:24:16 +0100 Subject: [PATCH] Fix unrounded numbers in notifications for strange counters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kill counts usually increment by 1, so this issue doesn’t appear there, but healing, for example, often increases the counter by more than 1. --- src/game/shared/swarm/rd_inventory_shared.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/shared/swarm/rd_inventory_shared.cpp b/src/game/shared/swarm/rd_inventory_shared.cpp index 10d1f8c3f..44275f939 100644 --- a/src/game/shared/swarm/rd_inventory_shared.cpp +++ b/src/game/shared/swarm/rd_inventory_shared.cpp @@ -1061,10 +1061,11 @@ static class CRD_Inventory_Manager final : public CAutoGameSystem, public CGameE if ( iTierBefore < iTierAfter && pNPC && pOwner ) { + int64_t iCountForTierAfter = CountForStrangeTier(iTierAfter); #ifdef CLIENT_DLL if ( CASWHud3DMarineNames *pMarineNames = assert_cast< CASWHud3DMarineNames * >( GetHud().FindElement( "ASWHud3DMarineNames" ) ) ) { - pMarineNames->OnStrangeDeviceTierNotification( pOwner, pNPC, instance.m_iItemDefID, iAccessoryID, iPropertyIndex, iCounterAfter ); + pMarineNames->OnStrangeDeviceTierNotification( pOwner, pNPC, instance.m_iItemDefID, iAccessoryID, iPropertyIndex, iCountForTierAfter ); } #else CReliableBroadcastRecipientFilter filter; @@ -1075,7 +1076,7 @@ static class CRD_Inventory_Manager final : public CAutoGameSystem, public CGameE WRITE_UBITLONG( instance.m_iItemDefID, RD_ITEM_ID_BITS ); WRITE_UBITLONG( iAccessoryID, RD_ITEM_ACCESSORY_BITS ); WRITE_UBITLONG( iPropertyIndex, 2 ); // 1 extra bit for possible future use - WRITE_BITS( &iCounterAfter, 64 ); + WRITE_BITS( &iCountForTierAfter, 64 ); MessageEnd(); #endif }