From 87788b449ef4175b5c013de187693fd06a89d643 Mon Sep 17 00:00:00 2001 From: Regalis Date: Tue, 30 May 2017 19:47:29 +0300 Subject: [PATCH] Disabled EntityEvent debug messages from release builds --- .../NetEntityEvent/ClientEntityEventManager.cs | 12 ++++++++---- .../NetEntityEvent/ServerEntityEventManager.cs | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Subsurface/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs b/Subsurface/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs index ded8fc1e3..3c168e98a 100644 --- a/Subsurface/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs +++ b/Subsurface/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs @@ -112,12 +112,15 @@ namespace Barotrauma.Networking unreceivedEntityEventCount = msg.ReadUInt16(); firstNewID = msg.ReadUInt16(); +#if DEBUG DebugConsole.NewMessage("received midround syncing msg, unreceived: "+unreceivedEntityEventCount+", first new ID: "+firstNewID, Microsoft.Xna.Framework.Color.Yellow); - +#endif } else if (firstNewID != null) { +#if DEBUG DebugConsole.NewMessage("midround syncing complete, switching to ID "+ (UInt16)(firstNewID - 1), Microsoft.Xna.Framework.Color.Yellow); +#endif lastReceivedID = (UInt16)(firstNewID - 1); firstNewID = null; @@ -133,8 +136,6 @@ namespace Barotrauma.Networking if (entityID == 0 && thisEventID == (UInt16)(lastReceivedID + 1)) { - DebugConsole.NewMessage("received empty event " + thisEventID, Microsoft.Xna.Framework.Color.Orange); - msg.ReadPadBits(); lastReceivedID++; continue; @@ -147,6 +148,7 @@ namespace Barotrauma.Networking //skip the event if we've already received it or if the entity isn't found if (thisEventID != (UInt16)(lastReceivedID + 1) || entity == null) { +#if DEBUG if (thisEventID != (UInt16)(lastReceivedID + 1)) { DebugConsole.NewMessage("received msg " + thisEventID + " (waiting for "+ (lastReceivedID+1) + ")", thisEventID