added restrictMessageSize
This commit is contained in:
@@ -700,7 +700,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
var tempBuffer = new ReadWriteMessage();
|
var tempBuffer = new ReadWriteMessage();
|
||||||
WriteStatus(tempBuffer);
|
WriteStatus(tempBuffer);
|
||||||
if (msg.LengthBytes + tempBuffer.LengthBytes >= 255 && restrictMessageSize)
|
if (msg.LengthBytes + tempBuffer.LengthBytes >= 255 && restrictMessageSize && GameMain.Lua.networking.restrictMessageSize)
|
||||||
{
|
{
|
||||||
msg.Write(false);
|
msg.Write(false);
|
||||||
DebugConsole.ThrowError($"Error when writing character spawn data: status data caused the length of the message to exceed 255 bytes ({msg.LengthBytes} + {tempBuffer.LengthBytes})");
|
DebugConsole.ThrowError($"Error when writing character spawn data: status data caused the length of the message to exceed 255 bytes ({msg.LengthBytes} + {tempBuffer.LengthBytes})");
|
||||||
|
|||||||
@@ -628,6 +628,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
public LuaSetup env;
|
public LuaSetup env;
|
||||||
|
|
||||||
|
public bool restrictMessageSize = true;
|
||||||
|
|
||||||
public LuaNetworking(LuaSetup e)
|
public LuaNetworking(LuaSetup e)
|
||||||
{
|
{
|
||||||
env = e;
|
env = e;
|
||||||
|
|||||||
Reference in New Issue
Block a user