public void AddToByteStream(VRage.ByteStream stream) { stream.addLong(EntityId); stream.addUShort((ushort)Type); stream.addVector3D(Position); stream.addBoolean(Transparent); stream.addBoolean(IsStatic); stream.addUShort((ushort)Revealability); stream.addUShort((ushort)Concealability); stream.addUShort((ushort)Status); }
// Byte Serialization public override void AddToByteStream(VRage.ByteStream stream) { base.AddToByteStream(stream); //Log.Trace("Adding observing entity to byte stream", "AddToByteStream"); stream.addLongList(EntitiesViewing.Keys.ToList()); stream.addDateTime(LastObservingTime); stream.addVector3D(LastObservingPosition); //Log.Trace("Serialized LastObservingTime of " + LastObservingTime, "AddToByteStream"); //Log.Trace("Serialized LastObservingPosition of " + LastObservingPosition, "AddToByteStream"); //Log.Trace("Serialized ViewDistance of " + ViewDistance, "AddToByteStream"); }
// Byte Serialization public virtual void AddToByteStream(VRage.ByteStream stream) { UpdateRevealabilityManual(); stream.addUShort((ushort)TypeOfEntity); stream.addLong(EntityId); stream.addVector3D(Position); // Clients don't need AABB details stream.addBoolean(IsRevealBlocked); stream.addBoolean(IsObserved); }