예제 #1
0
 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);
 }
예제 #2
0
 // Byte Serialization
 public override void AddToByteStream(VRage.ByteStream stream)
 {
     base.AddToByteStream(stream);
     UpdateConcealabilityManual();
     stream.addBoolean(IsObserved);
     stream.addBoolean(IsRevealBlocked);
     stream.addLongList(EntitiesViewedBy.Keys.ToList());
     stream.addDateTime(RevealedAt);
 }
예제 #3
0
 /*
 public Response(VRage.ByteStream stream, ushort typeId = (ushort)MessageType.RequestBase) :
     base((ushort)MessageDomain.ConcealClient, typeId) { }
 */
 protected void AddToByteStream(VRage.ByteStream stream)
 {
     stream.addBoolean(ServerRunning);
 }
 // Byte Serialization
 public override void AddToByteStream(VRage.ByteStream stream)
 {
     base.AddToByteStream(stream);
     stream.addBoolean(IsMoving);
     stream.addBoolean(RecentlyMoved);
     stream.addDateTime(RecentlyMovedEnds);
 }
예제 #5
0
        public void serialize(VRage.ByteStream stream)
        {
            stream.addBoolean(SupportedByFleet);
            stream.addLong(Grid.EntityId);
            stream.addUShort((ushort)m_EffectiveClass);
            stream.addString(Grid.DisplayName);
            stream.addUShort((ushort)BlockCount);

            // Serialize position data if the owner of the grid
            if (Grid.canInteractWith(Owner.PlayerID)) {
                stream.addBoolean(true);
                stream.addLong((long)Grid.GetPosition().X);
                stream.addLong((long)Grid.GetPosition().Y);
                stream.addLong((long)Grid.GetPosition().Z);
            }
            else {
                stream.addBoolean(false);
            }
        }
예제 #6
0
        public void serialize(VRage.ByteStream stream)
        {
            stream.addString(DisplayName);
            stream.addUShort((ushort)MaxPerFaction);
            stream.addUShort((ushort)MaxPerSoloPlayer);
            stream.addUShort((ushort)CaptureMultiplier);
            stream.addLong(MaxBlocks);
            stream.addBoolean(ShouldBeStation);

            stream.addUShort((ushort)BlockTypeLimits.Length);
            foreach (int limit in BlockTypeLimits) {
                stream.addUShort((ushort)limit);
            }
        }
예제 #7
0
        // Byte Serialization
        public virtual void AddToByteStream(VRage.ByteStream stream)
        {
            base.AddToByteStream(stream);

            Log.Trace("Adding Revealed Grid to byte stream", "AddToByteStream");

            if (SpawnOwners == null) {
                Log.Error("Serializing with null spawnowners", "AddToByteStream");
                SpawnOwners = new List<long>();
            }

            if (BigOwners == null) {
                Log.Error("Serializing with null BigOwners", "AddToByteStream");
                BigOwners = new List<long>();
            }

            Log.Info("Adding spawnowners ", "FromBytes");
            stream.addLongList(SpawnOwners);
            Log.Info("Adding BigOwners ", "FromBytes");
            stream.addLongList(BigOwners);
            stream.addBoolean(NeededForSpawn);
            stream.addBoolean(IsProducing);
            stream.addBoolean(IsChargingBatteries);
            stream.addBoolean(IsPiloted);
        }
예제 #8
0
 // 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);
 }
예제 #9
0
 // Byte Serialization
 public void AddToByteStream(VRage.ByteStream stream)
 {
     stream.addUlong(ControlledMovingGraceTimeSeconds);
     stream.addUlong(ControlledMovementGraceDistanceMeters);
     stream.addUlong(RevealVisibilityMeters);
     //RevealDetectabilityMeters = 10; //50;
     //RevealCommunicationMeters = 10; //50;
     //RevealCollisionMeters = 10; //10;
     stream.addBoolean(ConcealNearAsteroids);
 }