Esempio n. 1
0
        /// <summary>
        /// see https://github.com/EpicGames/UnrealEngine/blob/6c20d9831a968ad3cb156442bebb41a883e62152/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayPrediction.cpp#L7
        /// </summary>
        /// <param name="reader"></param>
        public void Serialize(NetBitReader reader)
        {
            var hasBaseKey            = false;
            var validKeyForConnection = reader.ReadBit();

            if (validKeyForConnection)
            {
                hasBaseKey = reader.ReadBit();
            }
            bIsServerInitiated = reader.ReadBit();
            if (validKeyForConnection)
            {
                CurrentKey = reader.ReadInt16();
                if (hasBaseKey)
                {
                    BaseKey = reader.ReadInt16();
                }
            }
        }