fixed restrictMessageSize and added writeClientList back
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -85,6 +85,7 @@ defaultLib["TextManager"] = CreateStatic("Barotrauma.TextManager")
|
||||
defaultLib["NetEntityEvent"] = CreateStatic("Barotrauma.Networking.NetEntityEvent")
|
||||
defaultLib["Screen"] = CreateStatic("Barotrauma.Screen")
|
||||
defaultLib["AttackResult"] = CreateStatic("Barotrauma.AttackResult", true)
|
||||
defaultLib["TempClient"] = CreateStatic("Networking.TempClient", true)
|
||||
|
||||
defaultLib["AIObjective"] = CreateStatic("Barotrauma.AIObjective", true)
|
||||
defaultLib["AIObjectiveChargeBatteries"] = CreateStatic("Barotrauma.AIObjectiveChargeBatteries", true)
|
||||
|
||||
@@ -45,7 +45,9 @@ RegisterBarotrauma("CharacterInventory")
|
||||
|
||||
RegisterBarotrauma("Item")
|
||||
RegisterBarotrauma("Submarine")
|
||||
RegisterBarotrauma("INetSerializableStruct")
|
||||
RegisterBarotrauma("Networking.Client")
|
||||
RegisterBarotrauma("Networking.TempClient")
|
||||
RegisterBarotrauma("Networking.NetworkConnection")
|
||||
RegisterBarotrauma("Networking.LidgrenConnection")
|
||||
RegisterBarotrauma("Networking.SteamP2PConnection")
|
||||
|
||||
Reference in New Issue
Block a user