From ae8906794f1c0316b42f1e4e061aa8a0c96c364b Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 28 Sep 2016 15:01:43 +0100 Subject: [PATCH] Fixed inventory continually updating --- Facepunch.Steamworks/Client/Inventory.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Facepunch.Steamworks/Client/Inventory.cs b/Facepunch.Steamworks/Client/Inventory.cs index 70a4498..e5b9932 100644 --- a/Facepunch.Steamworks/Client/Inventory.cs +++ b/Facepunch.Steamworks/Client/Inventory.cs @@ -100,11 +100,10 @@ namespace Facepunch.Steamworks internal void DestroyResult() { - if ( updateRequest != -1 ) - { - client.native.inventory.DestroyResult( updateRequest ); - updateRequest = -1; - } + if ( updateRequest == -1 ) return; + + client.native.inventory.DestroyResult( updateRequest ); + updateRequest = -1; } @@ -126,6 +125,8 @@ namespace Facepunch.Steamworks if ( status == Valve.Steamworks.EResult.k_EResultOK || status == Valve.Steamworks.EResult.k_EResultExpired ) { RetrieveInventory(); + DestroyResult(); + return; } // Some other error