fixed restrictMessageSize and added writeClientList back

This commit is contained in:
Evil Factory
2022-04-10 12:21:07 -03:00
parent dc7a7bd74d
commit b7d0376320
4 changed files with 6 additions and 1 deletions
@@ -701,7 +701,7 @@ namespace Barotrauma
var tempBuffer = new ReadWriteMessage();
WriteStatus(tempBuffer);
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize)
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize && GameMain.Lua.networking.restrictMessageSize)
{
msg.Write(false);
if (msgLengthBeforeStatus < 255)
@@ -1798,6 +1798,8 @@ namespace Barotrauma.Networking
outmsg.Write((byte)ServerNetObject.CLIENT_LIST);
outmsg.Write(LastClientListUpdateID);
GameMain.Lua.hook.Call("writeClientList", c, outmsg);
outmsg.Write((byte)connectedClients.Count);
foreach (Client client in connectedClients)
{