Sending NetEntityEvents from client to server, ItemComponent class doesn't implement the INetSerializable interfaces (only the derived classes do), reactor syncing

This commit is contained in:
Regalis
2016-11-13 19:34:23 +02:00
parent 724172fe7c
commit 3d234aef73
16 changed files with 146 additions and 59 deletions
@@ -43,7 +43,7 @@ namespace Barotrauma.Items.Components
/// <summary>
/// The base class for components holding the different functionalities of the item
/// </summary>
class ItemComponent : IPropertyObject, IClientSerializable, IServerSerializable
class ItemComponent : IPropertyObject
{
protected Item item;
@@ -662,12 +662,6 @@ namespace Barotrauma.Items.Components
}
}
public virtual void ClientWrite(NetBuffer msg, object[] extraData = null) { }
public virtual void ServerRead(NetIncomingMessage msg, Client c) { }
public virtual void ServerWrite(NetBuffer msg, Client c, object[] extraData = null) { }
public virtual void ClientRead(NetIncomingMessage msg, float sendingTime) { }
public virtual XElement Save(XElement parentElement)
{
XElement componentElement = new XElement(name);