(98ad00fa2) v0.9.1.0

This commit is contained in:
Joonas Rikkonen
2019-07-10 13:52:12 +03:00
parent 2a791887ed
commit afa2137bd2
104 changed files with 3041 additions and 3134 deletions
@@ -21,16 +21,28 @@ namespace Barotrauma.Networking
public readonly Entity Entity;
public readonly UInt16 ID;
public UInt16 EntityID
{
get;
private set;
}
//arbitrary extra data that will be passed to the Write method of the serializable entity
//(the index of an itemcomponent for example)
protected object[] Data;
public bool Sent;
protected NetEntityEvent(INetSerializable entity, UInt16 id)
protected NetEntityEvent(INetSerializable serializableEntity, UInt16 id)
{
this.ID = id;
this.Entity = entity as Entity;
this.Entity = serializableEntity as Entity;
RefreshEntityID();
}
public void RefreshEntityID()
{
this.EntityID = this.Entity is Entity entity ? entity.ID : Entity.NullEntityID;
}
public void SetData(object[] data)