From b988e633dd2ba7298f9a325244843fd57b9b3d59 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 9 Jun 2019 17:41:38 +0300 Subject: [PATCH] (c6a02d462) Don't show the "received a position update for an item with no physics body" error messages in release builds if verbose logging is not enabled (only send them to GameAnalytics). --- Barotrauma/BarotraumaClient/Source/Items/Item.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/Items/Item.cs b/Barotrauma/BarotraumaClient/Source/Items/Item.cs index 69dfbf125..abc2b548f 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Item.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Item.cs @@ -1007,7 +1007,13 @@ namespace Barotrauma { if (body == null) { - DebugConsole.ThrowError("Received a position update for an item with no physics body (" + Name + ")"); + string errorMsg = "Received a position update for an item with no physics body (" + Name + ")"; +#if DEBUG + DebugConsole.ThrowError(errorMsg); +#else + if (GameSettings.VerboseLogging) { DebugConsole.ThrowError(errorMsg); } +#endif + GameAnalyticsManager.AddErrorEventOnce("Item.ClientReadPosition:nophysicsbody", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg); return; }