(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).

This commit is contained in:
Joonas Rikkonen
2019-06-09 17:41:38 +03:00
parent f96008fc2e
commit b988e633dd
@@ -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;
}