Fixed client error reporting
This commit is contained in:
@@ -1650,6 +1650,7 @@ namespace Barotrauma.Networking
|
|||||||
public void ReportError(ClientNetError error,UInt16 expectedID=0,UInt16 eventID=0,UInt16 entityID=0)
|
public void ReportError(ClientNetError error,UInt16 expectedID=0,UInt16 eventID=0,UInt16 entityID=0)
|
||||||
{
|
{
|
||||||
NetOutgoingMessage outMsg = client.CreateMessage();
|
NetOutgoingMessage outMsg = client.CreateMessage();
|
||||||
|
outMsg.Write((byte)ClientPacketHeader.ERROR);
|
||||||
outMsg.Write((byte)error);
|
outMsg.Write((byte)error);
|
||||||
switch (error)
|
switch (error)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -648,8 +648,15 @@ namespace Barotrauma.Networking
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
GameServer.Log(c.Name+" has reported an error: "+errorStr, ServerLog.MessageType.Error);
|
if (c == null)
|
||||||
KickClient(c, errorStr);
|
{
|
||||||
|
KickClient(inc.SenderConnection, errorStr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameServer.Log(c.Name + " has reported an error: " + errorStr, ServerLog.MessageType.Error);
|
||||||
|
KickClient(c, errorStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClientReadLobby(NetIncomingMessage inc)
|
private void ClientReadLobby(NetIncomingMessage inc)
|
||||||
|
|||||||
Reference in New Issue
Block a user