Error logging when receiving an inventory network event for a character with no inventory
This commit is contained in:
@@ -174,7 +174,16 @@ namespace Barotrauma
|
||||
switch (eventType)
|
||||
{
|
||||
case 0:
|
||||
inventory.ClientRead(type, msg, sendingTime);
|
||||
if (inventory == null)
|
||||
{
|
||||
string errorMsg = "Received an inventory update message for an entity with no inventory (" + Name + ")";
|
||||
DebugConsole.ThrowError(errorMsg);
|
||||
GameAnalyticsManager.AddErrorEventOnce("CharacterNetworking.ClientRead:NoInventory" + ID, GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
inventory?.ClientRead(type, msg, sendingTime);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
byte ownerID = msg.ReadByte();
|
||||
|
||||
Reference in New Issue
Block a user