Version string sent to GameAnalytics includes the name and hash of the exe (makes it easier to identify events/errors from modded games), added stack trace to a ragdoll error message

This commit is contained in:
Joonas Rikkonen
2018-07-20 12:24:05 +03:00
parent bcd9fd7e5f
commit 20ed61a879
2 changed files with 6 additions and 3 deletions
@@ -28,7 +28,7 @@ namespace Barotrauma
GameAnalyticsManager.AddErrorEventOnce(
"Ragdoll.Limbs:AccessRemoved",
GameAnalyticsSDK.Net.EGAErrorSeverity.Error,
"Attempted to access a potentially removed ragdoll. Character: " + character.Name + ", id: " + character.ID + ", removed: " + character.Removed + ", ragdoll removed: " + !list.Contains(this));
"Attempted to access a potentially removed ragdoll. Character: " + character.Name + ", id: " + character.ID + ", removed: " + character.Removed + ", ragdoll removed: " + !list.Contains(this) + "\n" + Environment.StackTrace);
return new Limb[0];
}
@@ -17,7 +17,6 @@ namespace Barotrauma
#if DEBUG
GameAnalytics.SetEnabledInfoLog(true);
#endif
GameAnalytics.ConfigureBuild(GameMain.Version.ToString());
string exePath = Assembly.GetEntryAssembly().Location;
string exeName = null;
@@ -36,9 +35,13 @@ namespace Barotrauma
DebugConsole.ThrowError("Error while calculating MD5 hash for the executable \"" + exePath + "\"", e);
}
GameAnalytics.ConfigureBuild(GameMain.Version.ToString()
+ (string.IsNullOrEmpty(exeName) ? "Unknown" : exeName) + ":"
+ ((exeHash?.ShortHash == null) ? "Unknown" : exeHash.ShortHash));
GameAnalytics.AddDesignEvent("Executable:"
+ (string.IsNullOrEmpty(exeName) ? "Unknown" : exeName) + ":"
+ ((exeHash == null) ? "Unknown" : exeHash.ShortHash));
+ ((exeHash?.ShortHash == null) ? "Unknown" : exeHash.ShortHash));
GameAnalytics.ConfigureAvailableCustomDimensions01("singleplayer", "multiplayer", "editor");
GameAnalytics.Initialize("a3a073c20982de7c15d21e840e149122", "9010ad9a671233b8d9610d76cec8c897d9ff3ba7");