Disabled EntityEvent debug messages from release builds
This commit is contained in:
@@ -112,12 +112,15 @@ namespace Barotrauma.Networking
|
|||||||
unreceivedEntityEventCount = msg.ReadUInt16();
|
unreceivedEntityEventCount = msg.ReadUInt16();
|
||||||
firstNewID = msg.ReadUInt16();
|
firstNewID = msg.ReadUInt16();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
DebugConsole.NewMessage("received midround syncing msg, unreceived: "+unreceivedEntityEventCount+", first new ID: "+firstNewID, Microsoft.Xna.Framework.Color.Yellow);
|
DebugConsole.NewMessage("received midround syncing msg, unreceived: "+unreceivedEntityEventCount+", first new ID: "+firstNewID, Microsoft.Xna.Framework.Color.Yellow);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (firstNewID != null)
|
else if (firstNewID != null)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
DebugConsole.NewMessage("midround syncing complete, switching to ID "+ (UInt16)(firstNewID - 1), Microsoft.Xna.Framework.Color.Yellow);
|
DebugConsole.NewMessage("midround syncing complete, switching to ID "+ (UInt16)(firstNewID - 1), Microsoft.Xna.Framework.Color.Yellow);
|
||||||
|
#endif
|
||||||
|
|
||||||
lastReceivedID = (UInt16)(firstNewID - 1);
|
lastReceivedID = (UInt16)(firstNewID - 1);
|
||||||
firstNewID = null;
|
firstNewID = null;
|
||||||
@@ -133,8 +136,6 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
if (entityID == 0 && thisEventID == (UInt16)(lastReceivedID + 1))
|
if (entityID == 0 && thisEventID == (UInt16)(lastReceivedID + 1))
|
||||||
{
|
{
|
||||||
DebugConsole.NewMessage("received empty event " + thisEventID, Microsoft.Xna.Framework.Color.Orange);
|
|
||||||
|
|
||||||
msg.ReadPadBits();
|
msg.ReadPadBits();
|
||||||
lastReceivedID++;
|
lastReceivedID++;
|
||||||
continue;
|
continue;
|
||||||
@@ -147,6 +148,7 @@ namespace Barotrauma.Networking
|
|||||||
//skip the event if we've already received it or if the entity isn't found
|
//skip the event if we've already received it or if the entity isn't found
|
||||||
if (thisEventID != (UInt16)(lastReceivedID + 1) || entity == null)
|
if (thisEventID != (UInt16)(lastReceivedID + 1) || entity == null)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
if (thisEventID != (UInt16)(lastReceivedID + 1))
|
if (thisEventID != (UInt16)(lastReceivedID + 1))
|
||||||
{
|
{
|
||||||
DebugConsole.NewMessage("received msg " + thisEventID + " (waiting for "+ (lastReceivedID+1) + ")", thisEventID<lastReceivedID+1 ? Microsoft.Xna.Framework.Color.Yellow : Microsoft.Xna.Framework.Color.Red);
|
DebugConsole.NewMessage("received msg " + thisEventID + " (waiting for "+ (lastReceivedID+1) + ")", thisEventID<lastReceivedID+1 ? Microsoft.Xna.Framework.Color.Yellow : Microsoft.Xna.Framework.Color.Red);
|
||||||
@@ -155,13 +157,15 @@ namespace Barotrauma.Networking
|
|||||||
{
|
{
|
||||||
DebugConsole.NewMessage("received msg " + thisEventID + ", entity " + entityID + " not found", Microsoft.Xna.Framework.Color.Red);
|
DebugConsole.NewMessage("received msg " + thisEventID + ", entity " + entityID + " not found", Microsoft.Xna.Framework.Color.Red);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
msg.Position += msgLength * 8;
|
msg.Position += msgLength * 8;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long msgPosition = msg.Position;
|
long msgPosition = msg.Position;
|
||||||
|
#if DEBUG
|
||||||
DebugConsole.NewMessage("received msg " + thisEventID + " (" + entity.ToString() + ")", Microsoft.Xna.Framework.Color.Green);
|
DebugConsole.NewMessage("received msg " + thisEventID + " (" + entity.ToString() + ")", Microsoft.Xna.Framework.Color.Green);
|
||||||
|
#endif
|
||||||
lastReceivedID++;
|
lastReceivedID++;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ namespace Barotrauma.Networking
|
|||||||
//skip the event if we've already received it or if the entity isn't found
|
//skip the event if we've already received it or if the entity isn't found
|
||||||
if (thisEventID != (UInt16)(sender.lastSentEntityEventID + 1) || entity == null)
|
if (thisEventID != (UInt16)(sender.lastSentEntityEventID + 1) || entity == null)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
if (thisEventID != (UInt16)(sender.lastSentEntityEventID + 1))
|
if (thisEventID != (UInt16)(sender.lastSentEntityEventID + 1))
|
||||||
{
|
{
|
||||||
DebugConsole.NewMessage("received msg " + thisEventID, Microsoft.Xna.Framework.Color.Red);
|
DebugConsole.NewMessage("received msg " + thisEventID, Microsoft.Xna.Framework.Color.Red);
|
||||||
@@ -334,6 +335,7 @@ namespace Barotrauma.Networking
|
|||||||
{
|
{
|
||||||
DebugConsole.NewMessage("received msg " + thisEventID + ", entity " + entityID + " not found", Microsoft.Xna.Framework.Color.Red);
|
DebugConsole.NewMessage("received msg " + thisEventID + ", entity " + entityID + " not found", Microsoft.Xna.Framework.Color.Red);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
msg.Position += msgLength * 8;
|
msg.Position += msgLength * 8;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user