Unstable 0.17.1.0

This commit is contained in:
Markus Isberg
2022-03-17 01:25:04 +09:00
parent 3974067915
commit 6d410cc1b7
302 changed files with 5878 additions and 3317 deletions
@@ -1,17 +1,23 @@
using Barotrauma.Networking;
using System;
using Barotrauma.Networking;
namespace Barotrauma
{
partial class Submarine
{
public void ServerWrite(IWriteMessage msg, Client c, object[] extraData = null)
public void ServerWritePosition(IWriteMessage msg, Client c)
{
msg.Write(ID);
IWriteMessage tempBuffer = new WriteOnlyMessage();
subBody.Body.ServerWrite(tempBuffer, c, extraData);
subBody.Body.ServerWrite(tempBuffer);
msg.Write((byte)tempBuffer.LengthBytes);
msg.Write(tempBuffer.Buffer, 0, tempBuffer.LengthBytes);
msg.WritePadBits();
}
public void ServerEventWrite(IWriteMessage msg, Client c, NetEntityEvent.IData extraData = null)
{
throw new Exception($"Error while writing a network event for the submarine \"{Info.Name} ({ID})\". Submarines are not even supposed to send events!");
}
}
}