Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaServer/ServerSource/Map/Submarine.cs
Juan Pablo Arce 3f2c843247 Unstable v0.19.3.0
2022-09-02 15:10:56 -03:00

24 lines
808 B
C#

using System;
using Barotrauma.Networking;
namespace Barotrauma
{
partial class Submarine
{
public void ServerWritePosition(IWriteMessage msg, Client c)
{
msg.WriteUInt16(ID);
IWriteMessage tempBuffer = new WriteOnlyMessage();
subBody.Body.ServerWrite(tempBuffer);
msg.WriteByte((byte)tempBuffer.LengthBytes);
msg.WriteBytes(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!");
}
}
}