Ejemplo n.º 1
0
        public void Serialize(NetBitReader reader)
        {
            reader.SkipBytes(9);

            Key  = reader.ReadFString();
            Text = reader.ReadFString();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// see https://github.com/EpicGames/UnrealEngine/blob/6c20d9831a968ad3cb156442bebb41a883e62152/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L794
        /// </summary>
        /// <param name="reader"></param>
        public void Serialize(NetBitReader reader)
        {
            //var flags = reader.ReadInt32();
            //var historyType = reader.ReadByteAsEnum<ETextHistoryType>();
            // 4 bytes ?
            reader.SkipBytes(9);

            Namespace = reader.ReadFString();
            Text      = reader.ReadFString();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// see https://github.com/EpicGames/UnrealEngine/blob/6c20d9831a968ad3cb156442bebb41a883e62152/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L794
        /// </summary>
        /// <param name="reader"></param>
        public void Serialize(NetBitReader reader)
        {
            var flags       = reader.ReadInt32();
            var historyType = reader.ReadByteAsEnum <ETextHistoryType>();

            switch (historyType)
            {
            case ETextHistoryType.Base:
                Namespace = reader.ReadFString();
                Key       = reader.ReadFString();
                Text      = reader.ReadFString();
                break;
            }
        }
        public void Serialize(NetBitReader reader)
        {
            var isHardcoded = reader.ReadBoolean();

            if (isHardcoded)
            {
                uint nameIndex;
                if (reader.EngineNetworkVersion < EngineNetworkVersionHistory.HISTORY_CHANNEL_NAMES)
                {
                    nameIndex = reader.ReadUInt32();
                }
                else
                {
                    nameIndex = reader.ReadIntPacked();
                }

                Value = ((UnrealNames)nameIndex).ToString();

                return;
            }

            var inString = reader.ReadFString();
            var inNumber = reader.ReadInt32();

            Value = inString;
        }
Ejemplo n.º 5
0
        public void Serialize(NetBitReader reader)
        {
            int flags = reader.ReadInt32();
            ETextHistoryType historyType = reader.ReadByteAsEnum <ETextHistoryType>();

            switch (historyType)
            {
            case ETextHistoryType.Base:
                Namespace = reader.ReadFString();
                Key       = reader.ReadFString();
                Text      = reader.ReadFString();
                break;

            default:
                //Need to add other formats as they're encountered
                break;
            }
        }
Ejemplo n.º 6
0
 public void Serialize(NetBitReader reader)
 {
     TagName = reader.ReadFString();
 }
Ejemplo n.º 7
0
        private string AsFString()
        {
            _reader.Reset();

            return(_reader.ReadFString());
        }
        public void Serialize(NetBitReader reader)
        {
            return;

            bool[] flags = reader.ReadBits(7);

            BlockingHit      = flags[6];
            StartPenetrating = flags[5];
            bool impactPointEqualsLocation = flags[4];
            bool impactNormalEqualsNormal  = flags[3];
            bool invalidItem        = flags[2];
            bool invalidFaceIndex   = flags[1];
            bool noPenetrationDepth = flags[0];

            Time     = reader.ReadSingle();
            Location = reader.SerializePropertyQuantizeVector();
            Normal   = reader.SerializePropertyVectorNormal();

            if (!impactPointEqualsLocation)
            {
                ImpactPoint = reader.SerializePropertyQuantizeVector();
            }
            else
            {
                ImpactPoint = Location;
            }

            if (!impactNormalEqualsNormal)
            {
                ImpactNormal = reader.SerializePropertyVectorNormal();
            }
            else
            {
                ImpactNormal = Normal;
            }

            TraceStart = reader.SerializePropertyQuantizeVector();
            TraceEnd   = reader.SerializePropertyQuantizeVector();

            if (!noPenetrationDepth)
            {
                PenetrationDepth = reader.SerializePropertyFloat();
            }
            else
            {
                PenetrationDepth = 0;
            }

            Distance = (ImpactPoint - TraceStart).Size();

            if (!invalidItem)
            {
                Item = reader.ReadBitsToInt(32);
            }
            else
            {
                Item = -1;
            }

            PhysMaterial = reader.SerializePropertyUInt16();
            Actor        = reader.SerializePropertyUInt16();
            Component    = reader.SerializePropertyUInt16();
            BoneName     = reader.ReadFString();

            if (!invalidFaceIndex)
            {
                FaceIndex = reader.ReadBitsToInt(32);
            }
            else
            {
                FaceIndex = -1;
            }
        }