public void ReadPackedDelta(DataStreamReader reader, ref DataStreamReader.Context ctx, ReplicatedGuid baseline, NetworkCompressionModel compressionModel)
 {
     b0 = reader.ReadPackedUIntDelta(ref ctx, baseline.b0, compressionModel);
     b1 = reader.ReadPackedUIntDelta(ref ctx, baseline.b1, compressionModel);
     b2 = reader.ReadPackedUIntDelta(ref ctx, baseline.b2, compressionModel);
     b3 = reader.ReadPackedUIntDelta(ref ctx, baseline.b3, compressionModel);
 }
Example #2
0
        public static ulong ReadPackedULongDelta(this DataStreamReader reader, ref DataStreamReader.Context ctx, ulong baseline, NetworkCompressionModel compression)
        {
            var baselineUnion = new ULongUIntUnion {
                LongValue = baseline
            };

            var i1 = reader.ReadPackedUIntDelta(ref ctx, baselineUnion.Int0Value, compression);
            var i2 = reader.ReadPackedUIntDelta(ref ctx, baselineUnion.Int1Value, compression);

            return(new ULongUIntUnion {
                Int0Value = i1, Int1Value = i2
            }.LongValue);
        }
Example #3
0
 public void Deserialize(uint tick, ref __GHOST_NAME__SnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick = tick;
     #region __GHOST_READ_CHANGE_MASK__
     changeMask__GHOST_MASK_BATCH__ = reader.ReadPackedUIntDelta(baseline.changeMask__GHOST_MASK_BATCH__, compressionModel);
     #endregion
     #region __GHOST_READ_IS_PREDICTED__
     bool isPredicted = reader.ReadPackedUInt(compressionModel) != 0;
     #endregion
     #region __GHOST_READ__
     #endregion
     #region __GHOST_BEGIN_READ_PREDICTED__
     if (isPredicted)
     {
         #endregion
         #region __GHOST_READ_PREDICTED__
         #endregion
         #region __GHOST_END_READ_PREDICTED__
     }
     #endregion
     #region __GHOST_BEGIN_READ_INTERPOLATED__
     if (!isPredicted)
     {
         #endregion
         #region __GHOST_READ_INTERPOLATED__
         #endregion
         #region __GHOST_END_READ_INTERPOLATED__
     }
     #endregion
 }
Example #4
0
 public void Deserialize(uint tick, ref CubeSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         MovableCharacterComponentPlayerId = reader.ReadPackedIntDelta(baseline.MovableCharacterComponentPlayerId, compressionModel);
     }
     else
     {
         MovableCharacterComponentPlayerId = baseline.MovableCharacterComponentPlayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         PlayerDatahealth = reader.ReadPackedIntDelta(baseline.PlayerDatahealth, compressionModel);
     }
     else
     {
         PlayerDatahealth = baseline.PlayerDatahealth;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
 public void Deserialize(uint tick, ref BulletSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         PlayerIdComponentDataPlayerId = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerIdComponentDataPlayerId, compressionModel);
     }
     else
     {
         PlayerIdComponentDataPlayerId = baseline.PlayerIdComponentDataPlayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         RotationValue = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValue, compressionModel);
     }
     else
     {
         RotationValue = baseline.RotationValue;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueY, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
     }
 }
Example #6
0
 public void Deserialize(uint tick, ref BoidSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #7
0
    public void Deserialize(uint tick, ref ShipSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                            NetworkCompressionModel compressionModel)
    {
        this.tick   = tick;
        changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
        bool isPredicted = reader.ReadPackedUInt(ref ctx, compressionModel) != 0;

        if ((changeMask0 & (1 << 2)) != 0)
        {
            RotationValue = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValue, compressionModel);
        }
        else
        {
            RotationValue = baseline.RotationValue;
        }
        if ((changeMask0 & (1 << 3)) != 0)
        {
            TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueX, compressionModel);
            TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueY, compressionModel);
        }
        else
        {
            TranslationValueX = baseline.TranslationValueX;
            TranslationValueY = baseline.TranslationValueY;
        }
        if (isPredicted)
        {
            if ((changeMask0 & (1 << 0)) != 0)
            {
                PlayerIdComponentDataPlayerId = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerIdComponentDataPlayerId, compressionModel);
            }
            else
            {
                PlayerIdComponentDataPlayerId = baseline.PlayerIdComponentDataPlayerId;
            }
            if ((changeMask0 & (1 << 4)) != 0)
            {
                VelocityValueX = reader.ReadPackedIntDelta(ref ctx, baseline.VelocityValueX, compressionModel);
                VelocityValueY = reader.ReadPackedIntDelta(ref ctx, baseline.VelocityValueY, compressionModel);
            }
            else
            {
                VelocityValueX = baseline.VelocityValueX;
                VelocityValueY = baseline.VelocityValueY;
            }
        }
        if (!isPredicted)
        {
            if ((changeMask0 & (1 << 1)) != 0)
            {
                ShipStateComponentDataState = reader.ReadPackedIntDelta(ref ctx, baseline.ShipStateComponentDataState, compressionModel);
            }
            else
            {
                ShipStateComponentDataState = baseline.ShipStateComponentDataState;
            }
        }
    }
Example #8
0
 public void Deserialize(uint tick, ref ShipSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick = tick;
     playerId  = (int)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.playerId, compressionModel);
     posX      = reader.ReadPackedIntDelta(ref ctx, baseline.posX, compressionModel);
     posY      = reader.ReadPackedIntDelta(ref ctx, baseline.posY, compressionModel);
     rot       = reader.ReadPackedIntDelta(ref ctx, baseline.rot, compressionModel);
     state     = (int)reader.ReadPackedUInt(ref ctx, compressionModel);
 }
 public void Deserialize(uint tick, ref GameModeSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         GameModeDatagameTimerSeconds = reader.ReadPackedIntDelta(baseline.GameModeDatagameTimerSeconds, compressionModel);
     }
     else
     {
         GameModeDatagameTimerSeconds = baseline.GameModeDatagameTimerSeconds;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         GameModeDatagameTimerMessage = reader.ReadPackedStringDelta(baseline.GameModeDatagameTimerMessage, compressionModel);
     }
     else
     {
         GameModeDatagameTimerMessage = baseline.GameModeDatagameTimerMessage;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         GameModeDatateamName0 = reader.ReadPackedStringDelta(baseline.GameModeDatateamName0, compressionModel);
     }
     else
     {
         GameModeDatateamName0 = baseline.GameModeDatateamName0;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         GameModeDatateamName1 = reader.ReadPackedStringDelta(baseline.GameModeDatateamName1, compressionModel);
     }
     else
     {
         GameModeDatateamName1 = baseline.GameModeDatateamName1;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         GameModeDatateamScore0 = reader.ReadPackedIntDelta(baseline.GameModeDatateamScore0, compressionModel);
     }
     else
     {
         GameModeDatateamScore0 = baseline.GameModeDatateamScore0;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         GameModeDatateamScore1 = reader.ReadPackedIntDelta(baseline.GameModeDatateamScore1, compressionModel);
     }
     else
     {
         GameModeDatateamScore1 = baseline.GameModeDatateamScore1;
     }
 }
Example #10
0
 public void Deserialize(uint tick, DataStreamReader reader, ref DataStreamReader.Context ctx, UserCommand baseline, NetworkCompressionModel compressionModel)
 {
     this.tick     = tick;
     checkTick     = reader.ReadPackedIntDelta(ref ctx, baseline.checkTick, compressionModel);
     renderTick    = reader.ReadPackedIntDelta(ref ctx, baseline.renderTick, compressionModel);
     moveYaw       = 0.1f * reader.ReadPackedIntDelta(ref ctx, (int)(baseline.moveYaw * 10), compressionModel);
     moveMagnitude = 0.01f * reader.ReadPackedIntDelta(ref ctx, (int)(baseline.moveMagnitude * 100), compressionModel);
     buttons.flags = reader.ReadPackedUIntDelta(ref ctx, baseline.buttons.flags, compressionModel);
     lookYaw       = reader.ReadPackedFloatDelta(ref ctx, baseline.lookYaw, compressionModel);
     lookPitch     = reader.ReadPackedFloatDelta(ref ctx, baseline.lookPitch, compressionModel);
 }
 public void Deserialize(uint tick, ref PlayerStateSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         PlayerStateplayerId = reader.ReadPackedIntDelta(baseline.PlayerStateplayerId, compressionModel);
     }
     else
     {
         PlayerStateplayerId = baseline.PlayerStateplayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         PlayerStategameModeSystemInitialized = reader.ReadPackedUIntDelta(baseline.PlayerStategameModeSystemInitialized, compressionModel);
     }
     else
     {
         PlayerStategameModeSystemInitialized = baseline.PlayerStategameModeSystemInitialized;
     }
 }
 public void Deserialize(uint tick, ref TeleporterSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         TeleporterPresentationDataeffectTick = reader.ReadPackedIntDelta(ref ctx, baseline.TeleporterPresentationDataeffectTick, compressionModel);
     }
     else
     {
         TeleporterPresentationDataeffectTick = baseline.TeleporterPresentationDataeffectTick;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         Child0TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.Child0TranslationValueX, compressionModel);
         Child0TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.Child0TranslationValueY, compressionModel);
         Child0TranslationValueZ = reader.ReadPackedIntDelta(ref ctx, baseline.Child0TranslationValueZ, compressionModel);
     }
     else
     {
         Child0TranslationValueX = baseline.Child0TranslationValueX;
         Child0TranslationValueY = baseline.Child0TranslationValueY;
         Child0TranslationValueZ = baseline.Child0TranslationValueZ;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         Child1TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.Child1TranslationValueX, compressionModel);
         Child1TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.Child1TranslationValueY, compressionModel);
         Child1TranslationValueZ = reader.ReadPackedIntDelta(ref ctx, baseline.Child1TranslationValueZ, compressionModel);
     }
     else
     {
         Child1TranslationValueX = baseline.Child1TranslationValueX;
         Child1TranslationValueY = baseline.Child1TranslationValueY;
         Child1TranslationValueZ = baseline.Child1TranslationValueZ;
     }
 }
Example #13
0
 public void Deserialize(uint tick, ref GhostSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     #region __GHOST_READ__
     if ((changeMask__GHOST_MASK_BATCH__ & (1 << __GHOST_MASK_INDEX__)) != 0)
     {
         snapshot.__GHOST_FIELD_NAME__ = reader.ReadPackedUIntDelta(baseline.__GHOST_FIELD_NAME__, compressionModel);
     }
     else
     {
         snapshot.__GHOST_FIELD_NAME__ = baseline.__GHOST_FIELD_NAME__;
     }
     #endregion
 }
Example #14
0
 public void Deserialize(uint tick, ref NetSessionSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         NetSessionTimeToStart = reader.ReadPackedIntDelta(baseline.NetSessionTimeToStart, compressionModel);
     }
     else
     {
         NetSessionTimeToStart = baseline.NetSessionTimeToStart;
     }
 }
 public void Deserialize(uint tick, ref LagPlayerSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         LagPlayerplayerId = reader.ReadPackedIntDelta(baseline.LagPlayerplayerId, compressionModel);
     }
     else
     {
         LagPlayerplayerId = baseline.LagPlayerplayerId;
     }
 }
Example #16
0
 public void Deserialize(uint tick, ref CubeSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         MovableCubeComponentPlayerId = reader.ReadPackedIntDelta(ref ctx, baseline.MovableCubeComponentPlayerId, compressionModel);
     }
     else
     {
         MovableCubeComponentPlayerId = baseline.MovableCubeComponentPlayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(ref ctx, baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(ref ctx, baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #17
0
 public void Deserialize(uint tick, ref GameInfoSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         GameInfoComponentName = reader.ReadPackedStringDelta(baseline.GameInfoComponentName, compressionModel);
     }
     else
     {
         GameInfoComponentName = baseline.GameInfoComponentName;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         GameInfoComponentSizeX = reader.ReadPackedIntDelta(baseline.GameInfoComponentSizeX, compressionModel);
     }
     else
     {
         GameInfoComponentSizeX = baseline.GameInfoComponentSizeX;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         GameInfoComponentSizeY = reader.ReadPackedIntDelta(baseline.GameInfoComponentSizeY, compressionModel);
     }
     else
     {
         GameInfoComponentSizeY = baseline.GameInfoComponentSizeY;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         GameInfoComponentId = reader.ReadPackedIntDelta(baseline.GameInfoComponentId, compressionModel);
     }
     else
     {
         GameInfoComponentId = baseline.GameInfoComponentId;
     }
 }
Example #18
0
    public void Deserialize(uint tick, ref PilotSnapshotData baseline, ref DataStreamReader reader,
                            NetworkCompressionModel compressionModel)
    {
        this.tick   = tick;
        changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
        bool isPredicted = reader.ReadPackedUInt(compressionModel) != 0;

        if ((changeMask0 & (1 << 0)) != 0)
        {
            PilotDataPlayerId = reader.ReadPackedIntDelta(baseline.PilotDataPlayerId, compressionModel);
        }
        else
        {
            PilotDataPlayerId = baseline.PilotDataPlayerId;
        }
        if ((changeMask0 & (1 << 5)) != 0)
        {
            RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
            RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
            RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
            RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
        }
        else
        {
            RotationValueX = baseline.RotationValueX;
            RotationValueY = baseline.RotationValueY;
            RotationValueZ = baseline.RotationValueZ;
            RotationValueW = baseline.RotationValueW;
        }
        if ((changeMask0 & (1 << 6)) != 0)
        {
            TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
            TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
            TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
        }
        else
        {
            TranslationValueX = baseline.TranslationValueX;
            TranslationValueY = baseline.TranslationValueY;
            TranslationValueZ = baseline.TranslationValueZ;
        }
        if (isPredicted)
        {
            if ((changeMask0 & (1 << 1)) != 0)
            {
                PilotMovementSystemDatavelocityX = reader.ReadPackedIntDelta(baseline.PilotMovementSystemDatavelocityX, compressionModel);
                PilotMovementSystemDatavelocityY = reader.ReadPackedIntDelta(baseline.PilotMovementSystemDatavelocityY, compressionModel);
                PilotMovementSystemDatavelocityZ = reader.ReadPackedIntDelta(baseline.PilotMovementSystemDatavelocityZ, compressionModel);
            }
            else
            {
                PilotMovementSystemDatavelocityX = baseline.PilotMovementSystemDatavelocityX;
                PilotMovementSystemDatavelocityY = baseline.PilotMovementSystemDatavelocityY;
                PilotMovementSystemDatavelocityZ = baseline.PilotMovementSystemDatavelocityZ;
            }
            if ((changeMask0 & (1 << 2)) != 0)
            {
                PilotMovementSystemDataonGround = reader.ReadPackedUIntDelta(baseline.PilotMovementSystemDataonGround, compressionModel);
            }
            else
            {
                PilotMovementSystemDataonGround = baseline.PilotMovementSystemDataonGround;
            }
            if ((changeMask0 & (1 << 3)) != 0)
            {
                PilotMovementSystemDatajumpCooldown = reader.ReadPackedUIntDelta(baseline.PilotMovementSystemDatajumpCooldown, compressionModel);
            }
            else
            {
                PilotMovementSystemDatajumpCooldown = baseline.PilotMovementSystemDatajumpCooldown;
            }
            if ((changeMask0 & (1 << 4)) != 0)
            {
                PilotMovementSystemDatamovementMode = reader.ReadPackedIntDelta(baseline.PilotMovementSystemDatamovementMode, compressionModel);
            }
            else
            {
                PilotMovementSystemDatamovementMode = baseline.PilotMovementSystemDatamovementMode;
            }
        }
    }
Example #19
0
 public void Deserialize(uint tick, ref GameModeSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         GameModeDatagameTimerSeconds = reader.ReadPackedIntDelta(ref ctx, baseline.GameModeDatagameTimerSeconds, compressionModel);
     }
     else
     {
         GameModeDatagameTimerSeconds = baseline.GameModeDatagameTimerSeconds;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         GameModeDatagameTimerMessage.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.GameModeDatagameTimerMessage.LengthInBytes, compressionModel);
         var GameModeDatagameTimerMessageBaselineLength = (ushort)math.min((uint)GameModeDatagameTimerMessage.LengthInBytes, baseline.GameModeDatagameTimerMessage.LengthInBytes);
         for (int sb = 0; sb < GameModeDatagameTimerMessageBaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &GameModeDatagameTimerMessage.buffer.byte0000)
                 fixed(byte *b2 = &baseline.GameModeDatagameTimerMessage.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = GameModeDatagameTimerMessageBaselineLength; sb < GameModeDatagameTimerMessage.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &GameModeDatagameTimerMessage.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         GameModeDatagameTimerMessage = baseline.GameModeDatagameTimerMessage;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         GameModeDatateamName0.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.GameModeDatateamName0.LengthInBytes, compressionModel);
         var GameModeDatateamName0BaselineLength = (ushort)math.min((uint)GameModeDatateamName0.LengthInBytes, baseline.GameModeDatateamName0.LengthInBytes);
         for (int sb = 0; sb < GameModeDatateamName0BaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &GameModeDatateamName0.buffer.byte0000)
                 fixed(byte *b2 = &baseline.GameModeDatateamName0.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = GameModeDatateamName0BaselineLength; sb < GameModeDatateamName0.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &GameModeDatateamName0.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         GameModeDatateamName0 = baseline.GameModeDatateamName0;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         GameModeDatateamName1.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.GameModeDatateamName1.LengthInBytes, compressionModel);
         var GameModeDatateamName1BaselineLength = (ushort)math.min((uint)GameModeDatateamName1.LengthInBytes, baseline.GameModeDatateamName1.LengthInBytes);
         for (int sb = 0; sb < GameModeDatateamName1BaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &GameModeDatateamName1.buffer.byte0000)
                 fixed(byte *b2 = &baseline.GameModeDatateamName1.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = GameModeDatateamName1BaselineLength; sb < GameModeDatateamName1.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &GameModeDatateamName1.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         GameModeDatateamName1 = baseline.GameModeDatateamName1;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         GameModeDatateamScore0 = reader.ReadPackedIntDelta(ref ctx, baseline.GameModeDatateamScore0, compressionModel);
     }
     else
     {
         GameModeDatateamScore0 = baseline.GameModeDatateamScore0;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         GameModeDatateamScore1 = reader.ReadPackedIntDelta(ref ctx, baseline.GameModeDatateamScore1, compressionModel);
     }
     else
     {
         GameModeDatateamScore1 = baseline.GameModeDatateamScore1;
     }
 }
 public void Deserialize(uint tick, ref BArcherSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         HealthValue = reader.ReadPackedIntDelta(baseline.HealthValue, compressionModel);
     }
     else
     {
         HealthValue = baseline.HealthValue;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         PlayerUnitPlayerId = reader.ReadPackedIntDelta(baseline.PlayerUnitPlayerId, compressionModel);
     }
     else
     {
         PlayerUnitPlayerId = baseline.PlayerUnitPlayerId;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         PlayerUnitUnitId = reader.ReadPackedIntDelta(baseline.PlayerUnitUnitId, compressionModel);
     }
     else
     {
         PlayerUnitUnitId = baseline.PlayerUnitUnitId;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         UnitSelectionStateIsSelected = reader.ReadPackedUIntDelta(baseline.UnitSelectionStateIsSelected, compressionModel);
     }
     else
     {
         UnitSelectionStateIsSelected = baseline.UnitSelectionStateIsSelected;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         Child0RotationValueX = reader.ReadPackedIntDelta(baseline.Child0RotationValueX, compressionModel);
         Child0RotationValueY = reader.ReadPackedIntDelta(baseline.Child0RotationValueY, compressionModel);
         Child0RotationValueZ = reader.ReadPackedIntDelta(baseline.Child0RotationValueZ, compressionModel);
         Child0RotationValueW = reader.ReadPackedIntDelta(baseline.Child0RotationValueW, compressionModel);
     }
     else
     {
         Child0RotationValueX = baseline.Child0RotationValueX;
         Child0RotationValueY = baseline.Child0RotationValueY;
         Child0RotationValueZ = baseline.Child0RotationValueZ;
         Child0RotationValueW = baseline.Child0RotationValueW;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         Child0TranslationValueX = reader.ReadPackedIntDelta(baseline.Child0TranslationValueX, compressionModel);
         Child0TranslationValueY = reader.ReadPackedIntDelta(baseline.Child0TranslationValueY, compressionModel);
         Child0TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child0TranslationValueZ, compressionModel);
     }
     else
     {
         Child0TranslationValueX = baseline.Child0TranslationValueX;
         Child0TranslationValueY = baseline.Child0TranslationValueY;
         Child0TranslationValueZ = baseline.Child0TranslationValueZ;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         Child1RotationValueX = reader.ReadPackedIntDelta(baseline.Child1RotationValueX, compressionModel);
         Child1RotationValueY = reader.ReadPackedIntDelta(baseline.Child1RotationValueY, compressionModel);
         Child1RotationValueZ = reader.ReadPackedIntDelta(baseline.Child1RotationValueZ, compressionModel);
         Child1RotationValueW = reader.ReadPackedIntDelta(baseline.Child1RotationValueW, compressionModel);
     }
     else
     {
         Child1RotationValueX = baseline.Child1RotationValueX;
         Child1RotationValueY = baseline.Child1RotationValueY;
         Child1RotationValueZ = baseline.Child1RotationValueZ;
         Child1RotationValueW = baseline.Child1RotationValueW;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         Child1TranslationValueX = reader.ReadPackedIntDelta(baseline.Child1TranslationValueX, compressionModel);
         Child1TranslationValueY = reader.ReadPackedIntDelta(baseline.Child1TranslationValueY, compressionModel);
         Child1TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child1TranslationValueZ, compressionModel);
     }
     else
     {
         Child1TranslationValueX = baseline.Child1TranslationValueX;
         Child1TranslationValueY = baseline.Child1TranslationValueY;
         Child1TranslationValueZ = baseline.Child1TranslationValueZ;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         Child2RotationValueX = reader.ReadPackedIntDelta(baseline.Child2RotationValueX, compressionModel);
         Child2RotationValueY = reader.ReadPackedIntDelta(baseline.Child2RotationValueY, compressionModel);
         Child2RotationValueZ = reader.ReadPackedIntDelta(baseline.Child2RotationValueZ, compressionModel);
         Child2RotationValueW = reader.ReadPackedIntDelta(baseline.Child2RotationValueW, compressionModel);
     }
     else
     {
         Child2RotationValueX = baseline.Child2RotationValueX;
         Child2RotationValueY = baseline.Child2RotationValueY;
         Child2RotationValueZ = baseline.Child2RotationValueZ;
         Child2RotationValueW = baseline.Child2RotationValueW;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         Child2TranslationValueX = reader.ReadPackedIntDelta(baseline.Child2TranslationValueX, compressionModel);
         Child2TranslationValueY = reader.ReadPackedIntDelta(baseline.Child2TranslationValueY, compressionModel);
         Child2TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child2TranslationValueZ, compressionModel);
     }
     else
     {
         Child2TranslationValueX = baseline.Child2TranslationValueX;
         Child2TranslationValueY = baseline.Child2TranslationValueY;
         Child2TranslationValueZ = baseline.Child2TranslationValueZ;
     }
     if ((changeMask0 & (1 << 12)) != 0)
     {
         Child3RotationValueX = reader.ReadPackedIntDelta(baseline.Child3RotationValueX, compressionModel);
         Child3RotationValueY = reader.ReadPackedIntDelta(baseline.Child3RotationValueY, compressionModel);
         Child3RotationValueZ = reader.ReadPackedIntDelta(baseline.Child3RotationValueZ, compressionModel);
         Child3RotationValueW = reader.ReadPackedIntDelta(baseline.Child3RotationValueW, compressionModel);
     }
     else
     {
         Child3RotationValueX = baseline.Child3RotationValueX;
         Child3RotationValueY = baseline.Child3RotationValueY;
         Child3RotationValueZ = baseline.Child3RotationValueZ;
         Child3RotationValueW = baseline.Child3RotationValueW;
     }
     if ((changeMask0 & (1 << 13)) != 0)
     {
         Child3TranslationValueX = reader.ReadPackedIntDelta(baseline.Child3TranslationValueX, compressionModel);
         Child3TranslationValueY = reader.ReadPackedIntDelta(baseline.Child3TranslationValueY, compressionModel);
         Child3TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child3TranslationValueZ, compressionModel);
     }
     else
     {
         Child3TranslationValueX = baseline.Child3TranslationValueX;
         Child3TranslationValueY = baseline.Child3TranslationValueY;
         Child3TranslationValueZ = baseline.Child3TranslationValueZ;
     }
 }
Example #21
0
            private bool DeserializeEntity(uint serverTick, ref DataStreamReader dataStream, ref DeserializeData data)
            {
                if (data.targetArchLen == 0)
                {
#if UNITY_EDITOR || DEVELOPMENT_BUILD
                    data.curPos = dataStream.GetBitsRead();
                    if (data.statCount > 0)
                    {
                        int statType = (int)data.targetArch;
                        netStats[statType * 3 + 4] = netStats[statType * 3 + 4] + data.statCount;
                        netStats[statType * 3 + 5] = netStats[statType * 3 + 5] + (uint)(data.curPos - data.startPos);
                        netStats[statType * 3 + 6] = netStats[statType * 3 + 6] + data.uncompressedCount;
                    }

                    data.startPos          = data.curPos;
                    data.statCount         = 0;
                    data.uncompressedCount = 0;
#endif
                    data.targetArch    = dataStream.ReadPackedUInt(compressionModel);
                    data.targetArchLen = dataStream.ReadPackedUInt(compressionModel);
                }

                --data.targetArchLen;

                if (data.baselineLen == 0)
                {
                    data.baselineTick  = serverTick - dataStream.ReadPackedUInt(compressionModel);
                    data.baselineTick2 = serverTick - dataStream.ReadPackedUInt(compressionModel);
                    data.baselineTick3 = serverTick - dataStream.ReadPackedUInt(compressionModel);
                    data.baselineLen   = dataStream.ReadPackedUInt(compressionModel);
                    if (data.baselineTick3 != serverTick &&
                        (data.baselineTick3 == data.baselineTick2 || data.baselineTick2 == data.baselineTick))
                    {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                        UnityEngine.Debug.LogError("Received invalid snapshot baseline from server");
#endif
                        return(false);
                    }
                }

                --data.baselineLen;

                int  ghostId         = (int)dataStream.ReadPackedUInt(compressionModel);
                uint serverSpawnTick = 0;
                if (data.baselineTick == serverTick)
                {
                    serverSpawnTick = dataStream.ReadPackedUInt(compressionModel);
                }
                var   typeData        = GhostTypeCollection[(int)data.targetArch];
                int   changeMaskUints = GhostCollectionSystem.ChangeMaskArraySizeInUInts(typeData.ChangeMaskBits);
                int   snapshotOffset;
                int   snapshotSize = typeData.SnapshotSize;
                byte *baselineData = (byte *)UnsafeUtility.Malloc(snapshotSize, 16, Allocator.Temp);
                UnsafeUtility.MemClear(baselineData, snapshotSize);
                Entity gent;
                DynamicBuffer <SnapshotDataBuffer> snapshotDataBuffer;
                SnapshotData snapshotDataComponent;
                byte *       snapshotData;
                bool         existingGhost = ghostEntityMap.TryGetValue(ghostId, out gent);
                if (existingGhost && snapshotDataBufferFromEntity.HasComponent(gent) && ghostFromEntity[gent].ghostType == data.targetArch)
                {
                    snapshotDataBuffer = snapshotDataBufferFromEntity[gent];
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                    if (snapshotDataBuffer.Length != snapshotSize * GhostSystemConstants.SnapshotHistorySize)
                    {
                        throw new InvalidOperationException($"Invalid snapshot buffer size");
                    }
#endif
                    snapshotData                      = (byte *)snapshotDataBuffer.GetUnsafePtr();
                    snapshotDataComponent             = snapshotDataFromEntity[gent];
                    snapshotDataComponent.LatestIndex = (snapshotDataComponent.LatestIndex + 1) % GhostSystemConstants.SnapshotHistorySize;
                    snapshotDataFromEntity[gent]      = snapshotDataComponent;
                    if (data.baselineTick != serverTick)
                    {
                        for (int bi = 0; bi < snapshotDataBuffer.Length; bi += snapshotSize)
                        {
                            if (*(uint *)(snapshotData + bi) == data.baselineTick)
                            {
                                UnsafeUtility.MemCpy(baselineData, snapshotData + bi, snapshotSize);
                                break;
                            }
                        }

                        if (*(uint *)baselineData == 0)
                        {
                            return(false); // Ack desync detected
                        }
                    }

                    if (data.baselineTick3 != serverTick)
                    {
                        byte *baselineData2 = null;
                        byte *baselineData3 = null;
                        for (int bi = 0; bi < snapshotDataBuffer.Length; bi += snapshotSize)
                        {
                            if (*(uint *)(snapshotData + bi) == data.baselineTick2)
                            {
                                baselineData2 = snapshotData + bi;
                            }

                            if (*(uint *)(snapshotData + bi) == data.baselineTick3)
                            {
                                baselineData3 = snapshotData + bi;
                            }
                        }

                        if (baselineData2 == null || baselineData3 == null)
                        {
                            return(false); // Ack desync detected
                        }
                        snapshotOffset = GhostCollectionSystem.SnapshotSizeAligned(4 + changeMaskUints * 4);
                        var predictor = new GhostDeltaPredictor(serverTick, data.baselineTick, data.baselineTick2, data.baselineTick3);
                        for (int comp = 0; comp < typeData.NumComponents; ++comp)
                        {
                            int compIdx = GhostComponentIndex[typeData.FirstComponent + comp].ComponentIndex;
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                            if (snapshotOffset + GhostComponentCollection[compIdx].SnapshotSize > snapshotSize)
                            {
                                throw new InvalidOperationException("Snapshot buffer overflow during predict");
                            }
#endif
                            GhostComponentCollection[compIdx].PredictDelta.Ptr.Invoke((IntPtr)(baselineData + snapshotOffset), (IntPtr)(baselineData2 + snapshotOffset), (IntPtr)(baselineData3 + snapshotOffset), ref predictor);
                            snapshotOffset += GhostCollectionSystem.SnapshotSizeAligned(GhostComponentCollection[compIdx].SnapshotSize);
                        }
                    }
                }
                else
                {
                    if (existingGhost)
                    {
                        // The ghost entity map is out of date, clean it up
                        ghostEntityMap.Remove(ghostId);
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                        if (ghostFromEntity.HasComponent(gent) && ghostFromEntity[gent].ghostType != data.targetArch)
                        {
                            UnityEngine.Debug.LogError("Received a ghost with an invalid ghost type");
                        }
                        UnityEngine.Debug.LogError("Found a ghost in the ghost map which does not have an entity connected to it. This can happen if you delete ghost entities on the client.");
#endif
                    }
                    if (data.baselineTick != serverTick)
                    {
                        // If the server specifies a baseline for a ghost we do not have that is an error
                        return(false);
                    }
                    ++data.newGhosts;

                    var ghostSpawnBuffer = ghostSpawnBufferFromEntity[ghostSpawnEntity];
                    snapshotDataBuffer = snapshotDataBufferFromEntity[ghostSpawnEntity];
                    var snapshotDataBufferOffset = snapshotDataBuffer.Length;
                    ghostSpawnBuffer.Add(new GhostSpawnBuffer {
                        GhostType = (int)data.targetArch, GhostID = ghostId, DataOffset = snapshotDataBufferOffset, ClientSpawnTick = serverTick, ServerSpawnTick = serverSpawnTick
                    });
                    snapshotDataBuffer.ResizeUninitialized(snapshotDataBufferOffset + snapshotSize);
                    snapshotData = (byte *)snapshotDataBuffer.GetUnsafePtr() + snapshotDataBufferOffset;
                    UnsafeUtility.MemClear(snapshotData, snapshotSize);
                    snapshotDataComponent = new SnapshotData {
                        SnapshotSize = snapshotSize, LatestIndex = 0
                    };
                }
                int maskOffset = 0;
                snapshotOffset          = GhostCollectionSystem.SnapshotSizeAligned(4 + changeMaskUints * 4);
                snapshotData           += snapshotSize * snapshotDataComponent.LatestIndex;
                *(uint *)(snapshotData) = serverTick;
                uint *changeMask = (uint *)(snapshotData + 4);
                for (int cm = 0; cm < changeMaskUints; ++cm)
                {
                    changeMask[cm] = dataStream.ReadPackedUIntDelta(((uint *)(baselineData + 4))[cm], compressionModel);
                }
                for (int comp = 0; comp < typeData.NumComponents; ++comp)
                {
                    int compIdx = GhostComponentIndex[typeData.FirstComponent + comp].ComponentIndex;
#if ENABLE_UNITY_COLLECTIONS_CHECKS
                    if (maskOffset + GhostComponentCollection[compIdx].ChangeMaskBits > typeData.ChangeMaskBits || snapshotOffset + GhostComponentCollection[compIdx].SnapshotSize > snapshotSize)
                    {
                        throw new InvalidOperationException("Snapshot buffer overflow during deserialize");
                    }
#endif
                    GhostComponentCollection[compIdx].Deserialize.Ptr.Invoke((IntPtr)(snapshotData + snapshotOffset), (IntPtr)(baselineData + snapshotOffset), ref dataStream, ref compressionModel, (IntPtr)changeMask, maskOffset);
                    snapshotOffset += GhostCollectionSystem.SnapshotSizeAligned(GhostComponentCollection[compIdx].SnapshotSize);
                    maskOffset     += GhostComponentCollection[compIdx].ChangeMaskBits;
                }

#if UNITY_EDITOR || DEVELOPMENT_BUILD
                ++data.statCount;
                if (data.baselineTick == serverTick)
                {
                    ++data.uncompressedCount;
                }
#endif

                if (typeData.IsGhostGroup != 0)
                {
                    var groupLen = dataStream.ReadPackedUInt(compressionModel);
                    for (var i = 0; i < groupLen; ++i)
                    {
                        if (!DeserializeEntity(serverTick, ref dataStream, ref data))
                        {
                            return(false);
                        }
                    }
                }
                return(true);
            }
Example #22
0
 public void Deserialize(uint tick, ref CarStubSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         HealthComponentHealth = reader.ReadPackedIntDelta(baseline.HealthComponentHealth, compressionModel);
     }
     else
     {
         HealthComponentHealth = baseline.HealthComponentHealth;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         ProgressionComponentCrossedCheckpoints = reader.ReadPackedUIntDelta(baseline.ProgressionComponentCrossedCheckpoints, compressionModel);
     }
     else
     {
         ProgressionComponentCrossedCheckpoints = baseline.ProgressionComponentCrossedCheckpoints;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         SynchronizedCarComponentPlayerId = reader.ReadPackedIntDelta(baseline.SynchronizedCarComponentPlayerId, compressionModel);
     }
     else
     {
         SynchronizedCarComponentPlayerId = baseline.SynchronizedCarComponentPlayerId;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         SynchronizedCarComponentSteerAngle = reader.ReadPackedIntDelta(baseline.SynchronizedCarComponentSteerAngle, compressionModel);
     }
     else
     {
         SynchronizedCarComponentSteerAngle = baseline.SynchronizedCarComponentSteerAngle;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         SynchronizedCarComponentIsShieldActive = reader.ReadPackedUIntDelta(baseline.SynchronizedCarComponentIsShieldActive, compressionModel);
     }
     else
     {
         SynchronizedCarComponentIsShieldActive = baseline.SynchronizedCarComponentIsShieldActive;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #23
0
 public void Deserialize(uint tick, ref PlayerStateSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         PlayerStateplayerId = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStateplayerId, compressionModel);
     }
     else
     {
         PlayerStateplayerId = baseline.PlayerStateplayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         PlayerStateplayerName.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.PlayerStateplayerName.LengthInBytes, compressionModel);
         var PlayerStateplayerNameBaselineLength = (ushort)math.min((uint)PlayerStateplayerName.LengthInBytes, baseline.PlayerStateplayerName.LengthInBytes);
         for (int sb = 0; sb < PlayerStateplayerNameBaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &PlayerStateplayerName.buffer.byte0000)
                 fixed(byte *b2 = &baseline.PlayerStateplayerName.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = PlayerStateplayerNameBaselineLength; sb < PlayerStateplayerName.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &PlayerStateplayerName.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         PlayerStateplayerName = baseline.PlayerStateplayerName;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         PlayerStateteamIndex = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStateteamIndex, compressionModel);
     }
     else
     {
         PlayerStateteamIndex = baseline.PlayerStateteamIndex;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         PlayerStatescore = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStatescore, compressionModel);
     }
     else
     {
         PlayerStatescore = baseline.PlayerStatescore;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         PlayerStategameModeSystemInitialized = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStategameModeSystemInitialized, compressionModel);
     }
     else
     {
         PlayerStategameModeSystemInitialized = baseline.PlayerStategameModeSystemInitialized;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         PlayerStatedisplayCountDown = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStatedisplayCountDown, compressionModel);
     }
     else
     {
         PlayerStatedisplayCountDown = baseline.PlayerStatedisplayCountDown;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         PlayerStatecountDown = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStatecountDown, compressionModel);
     }
     else
     {
         PlayerStatecountDown = baseline.PlayerStatecountDown;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         PlayerStatedisplayScoreBoard = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStatedisplayScoreBoard, compressionModel);
     }
     else
     {
         PlayerStatedisplayScoreBoard = baseline.PlayerStatedisplayScoreBoard;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         PlayerStatedisplayGameScore = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStatedisplayGameScore, compressionModel);
     }
     else
     {
         PlayerStatedisplayGameScore = baseline.PlayerStatedisplayGameScore;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         PlayerStatedisplayGameResult = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStatedisplayGameResult, compressionModel);
     }
     else
     {
         PlayerStatedisplayGameResult = baseline.PlayerStatedisplayGameResult;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         PlayerStategameResult.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.PlayerStategameResult.LengthInBytes, compressionModel);
         var PlayerStategameResultBaselineLength = (ushort)math.min((uint)PlayerStategameResult.LengthInBytes, baseline.PlayerStategameResult.LengthInBytes);
         for (int sb = 0; sb < PlayerStategameResultBaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &PlayerStategameResult.buffer.byte0000)
                 fixed(byte *b2 = &baseline.PlayerStategameResult.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = PlayerStategameResultBaselineLength; sb < PlayerStategameResult.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &PlayerStategameResult.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         PlayerStategameResult = baseline.PlayerStategameResult;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         PlayerStatedisplayGoal = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStatedisplayGoal, compressionModel);
     }
     else
     {
         PlayerStatedisplayGoal = baseline.PlayerStatedisplayGoal;
     }
     if ((changeMask0 & (1 << 12)) != 0)
     {
         PlayerStategoalPositionX = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStategoalPositionX, compressionModel);
         PlayerStategoalPositionY = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStategoalPositionY, compressionModel);
         PlayerStategoalPositionZ = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStategoalPositionZ, compressionModel);
     }
     else
     {
         PlayerStategoalPositionX = baseline.PlayerStategoalPositionX;
         PlayerStategoalPositionY = baseline.PlayerStategoalPositionY;
         PlayerStategoalPositionZ = baseline.PlayerStategoalPositionZ;
     }
     if ((changeMask0 & (1 << 13)) != 0)
     {
         PlayerStategoalDefendersColor = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStategoalDefendersColor, compressionModel);
     }
     else
     {
         PlayerStategoalDefendersColor = baseline.PlayerStategoalDefendersColor;
     }
     if ((changeMask0 & (1 << 14)) != 0)
     {
         PlayerStategoalAttackersColor = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStategoalAttackersColor, compressionModel);
     }
     else
     {
         PlayerStategoalAttackersColor = baseline.PlayerStategoalAttackersColor;
     }
     if ((changeMask0 & (1 << 15)) != 0)
     {
         PlayerStategoalAttackers = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStategoalAttackers, compressionModel);
     }
     else
     {
         PlayerStategoalAttackers = baseline.PlayerStategoalAttackers;
     }
     if ((changeMask0 & (1 << 16)) != 0)
     {
         PlayerStategoalDefenders = reader.ReadPackedUIntDelta(ref ctx, baseline.PlayerStategoalDefenders, compressionModel);
     }
     else
     {
         PlayerStategoalDefenders = baseline.PlayerStategoalDefenders;
     }
     if ((changeMask0 & (1 << 17)) != 0)
     {
         PlayerStategoalString.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.PlayerStategoalString.LengthInBytes, compressionModel);
         var PlayerStategoalStringBaselineLength = (ushort)math.min((uint)PlayerStategoalString.LengthInBytes, baseline.PlayerStategoalString.LengthInBytes);
         for (int sb = 0; sb < PlayerStategoalStringBaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &PlayerStategoalString.buffer.byte0000)
                 fixed(byte *b2 = &baseline.PlayerStategoalString.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = PlayerStategoalStringBaselineLength; sb < PlayerStategoalString.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &PlayerStategoalString.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         PlayerStategoalString = baseline.PlayerStategoalString;
     }
     if ((changeMask0 & (1 << 18)) != 0)
     {
         PlayerStateactionString.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.PlayerStateactionString.LengthInBytes, compressionModel);
         var PlayerStateactionStringBaselineLength = (ushort)math.min((uint)PlayerStateactionString.LengthInBytes, baseline.PlayerStateactionString.LengthInBytes);
         for (int sb = 0; sb < PlayerStateactionStringBaselineLength; ++sb)
         {
             unsafe
             {
                 fixed(byte *b1 = &PlayerStateactionString.buffer.byte0000)
                 fixed(byte *b2 = &baseline.PlayerStateactionString.buffer.byte0000)
                 {
                     b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
                 }
             }
         }
         for (int sb = PlayerStateactionStringBaselineLength; sb < PlayerStateactionString.LengthInBytes; ++sb)
         {
             unsafe
             {
                 fixed(byte *b = &PlayerStateactionString.buffer.byte0000)
                 {
                     b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
                 }
             }
         }
     }
     else
     {
         PlayerStateactionString = baseline.PlayerStateactionString;
     }
     if ((changeMask0 & (1 << 19)) != 0)
     {
         PlayerStategoalCompletion = reader.ReadPackedIntDelta(ref ctx, baseline.PlayerStategoalCompletion, compressionModel);
     }
     else
     {
         PlayerStategoalCompletion = baseline.PlayerStategoalCompletion;
     }
 }
Example #24
0
 public void Deserialize(uint tick, ref Tree_1SnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         Child0RotationValueX = reader.ReadPackedIntDelta(baseline.Child0RotationValueX, compressionModel);
         Child0RotationValueY = reader.ReadPackedIntDelta(baseline.Child0RotationValueY, compressionModel);
         Child0RotationValueZ = reader.ReadPackedIntDelta(baseline.Child0RotationValueZ, compressionModel);
         Child0RotationValueW = reader.ReadPackedIntDelta(baseline.Child0RotationValueW, compressionModel);
     }
     else
     {
         Child0RotationValueX = baseline.Child0RotationValueX;
         Child0RotationValueY = baseline.Child0RotationValueY;
         Child0RotationValueZ = baseline.Child0RotationValueZ;
         Child0RotationValueW = baseline.Child0RotationValueW;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         Child0TranslationValueX = reader.ReadPackedIntDelta(baseline.Child0TranslationValueX, compressionModel);
         Child0TranslationValueY = reader.ReadPackedIntDelta(baseline.Child0TranslationValueY, compressionModel);
         Child0TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child0TranslationValueZ, compressionModel);
     }
     else
     {
         Child0TranslationValueX = baseline.Child0TranslationValueX;
         Child0TranslationValueY = baseline.Child0TranslationValueY;
         Child0TranslationValueZ = baseline.Child0TranslationValueZ;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         Child1RotationValueX = reader.ReadPackedIntDelta(baseline.Child1RotationValueX, compressionModel);
         Child1RotationValueY = reader.ReadPackedIntDelta(baseline.Child1RotationValueY, compressionModel);
         Child1RotationValueZ = reader.ReadPackedIntDelta(baseline.Child1RotationValueZ, compressionModel);
         Child1RotationValueW = reader.ReadPackedIntDelta(baseline.Child1RotationValueW, compressionModel);
     }
     else
     {
         Child1RotationValueX = baseline.Child1RotationValueX;
         Child1RotationValueY = baseline.Child1RotationValueY;
         Child1RotationValueZ = baseline.Child1RotationValueZ;
         Child1RotationValueW = baseline.Child1RotationValueW;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         Child1TranslationValueX = reader.ReadPackedIntDelta(baseline.Child1TranslationValueX, compressionModel);
         Child1TranslationValueY = reader.ReadPackedIntDelta(baseline.Child1TranslationValueY, compressionModel);
         Child1TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child1TranslationValueZ, compressionModel);
     }
     else
     {
         Child1TranslationValueX = baseline.Child1TranslationValueX;
         Child1TranslationValueY = baseline.Child1TranslationValueY;
         Child1TranslationValueZ = baseline.Child1TranslationValueZ;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         Child2RotationValueX = reader.ReadPackedIntDelta(baseline.Child2RotationValueX, compressionModel);
         Child2RotationValueY = reader.ReadPackedIntDelta(baseline.Child2RotationValueY, compressionModel);
         Child2RotationValueZ = reader.ReadPackedIntDelta(baseline.Child2RotationValueZ, compressionModel);
         Child2RotationValueW = reader.ReadPackedIntDelta(baseline.Child2RotationValueW, compressionModel);
     }
     else
     {
         Child2RotationValueX = baseline.Child2RotationValueX;
         Child2RotationValueY = baseline.Child2RotationValueY;
         Child2RotationValueZ = baseline.Child2RotationValueZ;
         Child2RotationValueW = baseline.Child2RotationValueW;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         Child2TranslationValueX = reader.ReadPackedIntDelta(baseline.Child2TranslationValueX, compressionModel);
         Child2TranslationValueY = reader.ReadPackedIntDelta(baseline.Child2TranslationValueY, compressionModel);
         Child2TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child2TranslationValueZ, compressionModel);
     }
     else
     {
         Child2TranslationValueX = baseline.Child2TranslationValueX;
         Child2TranslationValueY = baseline.Child2TranslationValueY;
         Child2TranslationValueZ = baseline.Child2TranslationValueZ;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         Child3RotationValueX = reader.ReadPackedIntDelta(baseline.Child3RotationValueX, compressionModel);
         Child3RotationValueY = reader.ReadPackedIntDelta(baseline.Child3RotationValueY, compressionModel);
         Child3RotationValueZ = reader.ReadPackedIntDelta(baseline.Child3RotationValueZ, compressionModel);
         Child3RotationValueW = reader.ReadPackedIntDelta(baseline.Child3RotationValueW, compressionModel);
     }
     else
     {
         Child3RotationValueX = baseline.Child3RotationValueX;
         Child3RotationValueY = baseline.Child3RotationValueY;
         Child3RotationValueZ = baseline.Child3RotationValueZ;
         Child3RotationValueW = baseline.Child3RotationValueW;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         Child3TranslationValueX = reader.ReadPackedIntDelta(baseline.Child3TranslationValueX, compressionModel);
         Child3TranslationValueY = reader.ReadPackedIntDelta(baseline.Child3TranslationValueY, compressionModel);
         Child3TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child3TranslationValueZ, compressionModel);
     }
     else
     {
         Child3TranslationValueX = baseline.Child3TranslationValueX;
         Child3TranslationValueY = baseline.Child3TranslationValueY;
         Child3TranslationValueZ = baseline.Child3TranslationValueZ;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         Child4RotationValueX = reader.ReadPackedIntDelta(baseline.Child4RotationValueX, compressionModel);
         Child4RotationValueY = reader.ReadPackedIntDelta(baseline.Child4RotationValueY, compressionModel);
         Child4RotationValueZ = reader.ReadPackedIntDelta(baseline.Child4RotationValueZ, compressionModel);
         Child4RotationValueW = reader.ReadPackedIntDelta(baseline.Child4RotationValueW, compressionModel);
     }
     else
     {
         Child4RotationValueX = baseline.Child4RotationValueX;
         Child4RotationValueY = baseline.Child4RotationValueY;
         Child4RotationValueZ = baseline.Child4RotationValueZ;
         Child4RotationValueW = baseline.Child4RotationValueW;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         Child4TranslationValueX = reader.ReadPackedIntDelta(baseline.Child4TranslationValueX, compressionModel);
         Child4TranslationValueY = reader.ReadPackedIntDelta(baseline.Child4TranslationValueY, compressionModel);
         Child4TranslationValueZ = reader.ReadPackedIntDelta(baseline.Child4TranslationValueZ, compressionModel);
     }
     else
     {
         Child4TranslationValueX = baseline.Child4TranslationValueX;
         Child4TranslationValueY = baseline.Child4TranslationValueY;
         Child4TranslationValueZ = baseline.Child4TranslationValueZ;
     }
 }
Example #25
0
 public void Deserialize(uint tick, ref PilotSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         CameraRigChildheadPoseX = reader.ReadPackedIntDelta(baseline.CameraRigChildheadPoseX, compressionModel);
         CameraRigChildheadPoseY = reader.ReadPackedIntDelta(baseline.CameraRigChildheadPoseY, compressionModel);
         CameraRigChildheadPoseZ = reader.ReadPackedIntDelta(baseline.CameraRigChildheadPoseZ, compressionModel);
     }
     else
     {
         CameraRigChildheadPoseX = baseline.CameraRigChildheadPoseX;
         CameraRigChildheadPoseY = baseline.CameraRigChildheadPoseY;
         CameraRigChildheadPoseZ = baseline.CameraRigChildheadPoseZ;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         CameraRigChildheadRotX = reader.ReadPackedIntDelta(baseline.CameraRigChildheadRotX, compressionModel);
         CameraRigChildheadRotY = reader.ReadPackedIntDelta(baseline.CameraRigChildheadRotY, compressionModel);
         CameraRigChildheadRotZ = reader.ReadPackedIntDelta(baseline.CameraRigChildheadRotZ, compressionModel);
         CameraRigChildheadRotW = reader.ReadPackedIntDelta(baseline.CameraRigChildheadRotW, compressionModel);
     }
     else
     {
         CameraRigChildheadRotX = baseline.CameraRigChildheadRotX;
         CameraRigChildheadRotY = baseline.CameraRigChildheadRotY;
         CameraRigChildheadRotZ = baseline.CameraRigChildheadRotZ;
         CameraRigChildheadRotW = baseline.CameraRigChildheadRotW;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         CameraRigChildleftHandPoseX = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandPoseX, compressionModel);
         CameraRigChildleftHandPoseY = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandPoseY, compressionModel);
         CameraRigChildleftHandPoseZ = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandPoseZ, compressionModel);
     }
     else
     {
         CameraRigChildleftHandPoseX = baseline.CameraRigChildleftHandPoseX;
         CameraRigChildleftHandPoseY = baseline.CameraRigChildleftHandPoseY;
         CameraRigChildleftHandPoseZ = baseline.CameraRigChildleftHandPoseZ;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         CameraRigChildleftHandRotX = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandRotX, compressionModel);
         CameraRigChildleftHandRotY = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandRotY, compressionModel);
         CameraRigChildleftHandRotZ = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandRotZ, compressionModel);
         CameraRigChildleftHandRotW = reader.ReadPackedIntDelta(baseline.CameraRigChildleftHandRotW, compressionModel);
     }
     else
     {
         CameraRigChildleftHandRotX = baseline.CameraRigChildleftHandRotX;
         CameraRigChildleftHandRotY = baseline.CameraRigChildleftHandRotY;
         CameraRigChildleftHandRotZ = baseline.CameraRigChildleftHandRotZ;
         CameraRigChildleftHandRotW = baseline.CameraRigChildleftHandRotW;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         CameraRigChildrightHandPoseX = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandPoseX, compressionModel);
         CameraRigChildrightHandPoseY = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandPoseY, compressionModel);
         CameraRigChildrightHandPoseZ = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandPoseZ, compressionModel);
     }
     else
     {
         CameraRigChildrightHandPoseX = baseline.CameraRigChildrightHandPoseX;
         CameraRigChildrightHandPoseY = baseline.CameraRigChildrightHandPoseY;
         CameraRigChildrightHandPoseZ = baseline.CameraRigChildrightHandPoseZ;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         CameraRigChildrightHandRotX = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandRotX, compressionModel);
         CameraRigChildrightHandRotY = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandRotY, compressionModel);
         CameraRigChildrightHandRotZ = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandRotZ, compressionModel);
         CameraRigChildrightHandRotW = reader.ReadPackedIntDelta(baseline.CameraRigChildrightHandRotW, compressionModel);
     }
     else
     {
         CameraRigChildrightHandRotX = baseline.CameraRigChildrightHandRotX;
         CameraRigChildrightHandRotY = baseline.CameraRigChildrightHandRotY;
         CameraRigChildrightHandRotZ = baseline.CameraRigChildrightHandRotZ;
         CameraRigChildrightHandRotW = baseline.CameraRigChildrightHandRotW;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         PilotDataPlayerId = reader.ReadPackedIntDelta(baseline.PilotDataPlayerId, compressionModel);
     }
     else
     {
         PilotDataPlayerId = baseline.PilotDataPlayerId;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #26
0
 public void Deserialize(uint tick, ref CharacterSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         AttackAttackType = reader.ReadPackedIntDelta(baseline.AttackAttackType, compressionModel);
     }
     else
     {
         AttackAttackType = baseline.AttackAttackType;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         AttackSeed = reader.ReadPackedIntDelta(baseline.AttackSeed, compressionModel);
     }
     else
     {
         AttackSeed = baseline.AttackSeed;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         AttackAttackDirectionX = reader.ReadPackedIntDelta(baseline.AttackAttackDirectionX, compressionModel);
         AttackAttackDirectionY = reader.ReadPackedIntDelta(baseline.AttackAttackDirectionY, compressionModel);
     }
     else
     {
         AttackAttackDirectionX = baseline.AttackAttackDirectionX;
         AttackAttackDirectionY = baseline.AttackAttackDirectionY;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         AttackTarget = reader.ReadPackedIntDelta(baseline.AttackTarget, compressionModel);
     }
     else
     {
         AttackTarget = baseline.AttackTarget;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         AttackNeedApplyDamage = reader.ReadPackedUIntDelta(baseline.AttackNeedApplyDamage, compressionModel);
     }
     else
     {
         AttackNeedApplyDamage = baseline.AttackNeedApplyDamage;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         DamageDamageType = reader.ReadPackedIntDelta(baseline.DamageDamageType, compressionModel);
     }
     else
     {
         DamageDamageType = baseline.DamageDamageType;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         MovableCharacterComponentPlayerId = reader.ReadPackedIntDelta(baseline.MovableCharacterComponentPlayerId, compressionModel);
     }
     else
     {
         MovableCharacterComponentPlayerId = baseline.MovableCharacterComponentPlayerId;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         PlayerDatahealth = reader.ReadPackedIntDelta(baseline.PlayerDatahealth, compressionModel);
     }
     else
     {
         PlayerDatahealth = baseline.PlayerDatahealth;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         PlayerDataprimarySkillId = reader.ReadPackedIntDelta(baseline.PlayerDataprimarySkillId, compressionModel);
     }
     else
     {
         PlayerDataprimarySkillId = baseline.PlayerDataprimarySkillId;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         PlayerDatamaxHealth = reader.ReadPackedIntDelta(baseline.PlayerDatamaxHealth, compressionModel);
     }
     else
     {
         PlayerDatamaxHealth = baseline.PlayerDatamaxHealth;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         PlayerDatapower = reader.ReadPackedIntDelta(baseline.PlayerDatapower, compressionModel);
     }
     else
     {
         PlayerDatapower = baseline.PlayerDatapower;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         PlayerDatamagic = reader.ReadPackedIntDelta(baseline.PlayerDatamagic, compressionModel);
     }
     else
     {
         PlayerDatamagic = baseline.PlayerDatamagic;
     }
     if ((changeMask0 & (1 << 12)) != 0)
     {
         PlayerDatadamageRadius = reader.ReadPackedIntDelta(baseline.PlayerDatadamageRadius, compressionModel);
     }
     else
     {
         PlayerDatadamageRadius = baseline.PlayerDatadamageRadius;
     }
     if ((changeMask0 & (1 << 13)) != 0)
     {
         PlayerDatainventory = reader.ReadPackedUIntDelta(baseline.PlayerDatainventory, compressionModel);
     }
     else
     {
         PlayerDatainventory = baseline.PlayerDatainventory;
     }
     if ((changeMask0 & (1 << 14)) != 0)
     {
         PlayerDataattackSkillId = reader.ReadPackedIntDelta(baseline.PlayerDataattackSkillId, compressionModel);
     }
     else
     {
         PlayerDataattackSkillId = baseline.PlayerDataattackSkillId;
     }
     if ((changeMask0 & (1 << 15)) != 0)
     {
         PlayerDatadefenceSkillId = reader.ReadPackedIntDelta(baseline.PlayerDatadefenceSkillId, compressionModel);
     }
     else
     {
         PlayerDatadefenceSkillId = baseline.PlayerDatadefenceSkillId;
     }
     if ((changeMask0 & (1 << 16)) != 0)
     {
         PlayerDatautilsSkillId = reader.ReadPackedIntDelta(baseline.PlayerDatautilsSkillId, compressionModel);
     }
     else
     {
         PlayerDatautilsSkillId = baseline.PlayerDatautilsSkillId;
     }
     if ((changeMask0 & (1 << 17)) != 0)
     {
         PlayerDataspeedMod = reader.ReadPackedFloatDelta(baseline.PlayerDataspeedMod, compressionModel);
     }
     else
     {
         PlayerDataspeedMod = baseline.PlayerDataspeedMod;
     }
     if ((changeMask0 & (1 << 18)) != 0)
     {
         PlayerDatastun = reader.ReadPackedUIntDelta(baseline.PlayerDatastun, compressionModel);
     }
     else
     {
         PlayerDatastun = baseline.PlayerDatastun;
     }
     if ((changeMask0 & (1 << 19)) != 0)
     {
         PrefabCreatorNameId = reader.ReadPackedUIntDelta(baseline.PrefabCreatorNameId, compressionModel);
     }
     else
     {
         PrefabCreatorNameId = baseline.PrefabCreatorNameId;
     }
     if ((changeMask0 & (1 << 20)) != 0)
     {
         PrefabCreatorSkinId = reader.ReadPackedUIntDelta(baseline.PrefabCreatorSkinId, compressionModel);
     }
     else
     {
         PrefabCreatorSkinId = baseline.PrefabCreatorSkinId;
     }
     if ((changeMask0 & (1 << 21)) != 0)
     {
         PrefabCreatorSkinSetting = reader.ReadPackedStringDelta(baseline.PrefabCreatorSkinSetting, compressionModel);
     }
     else
     {
         PrefabCreatorSkinSetting = baseline.PrefabCreatorSkinSetting;
     }
     if ((changeMask0 & (1 << 22)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 23)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #27
0
 public void Deserialize(uint tick, ref SphereSnapshotData baseline, ref DataStreamReader reader,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         PlayerDataplayerId = reader.ReadPackedIntDelta(baseline.PlayerDataplayerId, compressionModel);
     }
     else
     {
         PlayerDataplayerId = baseline.PlayerDataplayerId;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         PlayerDatamaxHealth = reader.ReadPackedIntDelta(baseline.PlayerDatamaxHealth, compressionModel);
     }
     else
     {
         PlayerDatamaxHealth = baseline.PlayerDatamaxHealth;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         PlayerDatacurrentHealth = reader.ReadPackedIntDelta(baseline.PlayerDatacurrentHealth, compressionModel);
     }
     else
     {
         PlayerDatacurrentHealth = baseline.PlayerDatacurrentHealth;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         PlayerDatadeath = reader.ReadPackedUIntDelta(baseline.PlayerDatadeath, compressionModel);
     }
     else
     {
         PlayerDatadeath = baseline.PlayerDatadeath;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         PlayerDataauto = reader.ReadPackedUIntDelta(baseline.PlayerDataauto, compressionModel);
     }
     else
     {
         PlayerDataauto = baseline.PlayerDataauto;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         PlayerDataautoSpawn = reader.ReadPackedUIntDelta(baseline.PlayerDataautoSpawn, compressionModel);
     }
     else
     {
         PlayerDataautoSpawn = baseline.PlayerDataautoSpawn;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         PlayerDatadestX = reader.ReadPackedIntDelta(baseline.PlayerDatadestX, compressionModel);
         PlayerDatadestY = reader.ReadPackedIntDelta(baseline.PlayerDatadestY, compressionModel);
         PlayerDatadestZ = reader.ReadPackedIntDelta(baseline.PlayerDatadestZ, compressionModel);
     }
     else
     {
         PlayerDatadestX = baseline.PlayerDatadestX;
         PlayerDatadestY = baseline.PlayerDatadestY;
         PlayerDatadestZ = baseline.PlayerDatadestZ;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         PlayerDatadest2X = reader.ReadPackedIntDelta(baseline.PlayerDatadest2X, compressionModel);
         PlayerDatadest2Y = reader.ReadPackedIntDelta(baseline.PlayerDatadest2Y, compressionModel);
         PlayerDatadest2Z = reader.ReadPackedIntDelta(baseline.PlayerDatadest2Z, compressionModel);
     }
     else
     {
         PlayerDatadest2X = baseline.PlayerDatadest2X;
         PlayerDatadest2Y = baseline.PlayerDatadest2Y;
         PlayerDatadest2Z = baseline.PlayerDatadest2Z;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         PlayerDatakilledBy = reader.ReadPackedIntDelta(baseline.PlayerDatakilledBy, compressionModel);
     }
     else
     {
         PlayerDatakilledBy = baseline.PlayerDatakilledBy;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         PlayerDatakilledByID = reader.ReadPackedIntDelta(baseline.PlayerDatakilledByID, compressionModel);
     }
     else
     {
         PlayerDatakilledByID = baseline.PlayerDatakilledByID;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         RotationValueX = reader.ReadPackedIntDelta(baseline.RotationValueX, compressionModel);
         RotationValueY = reader.ReadPackedIntDelta(baseline.RotationValueY, compressionModel);
         RotationValueZ = reader.ReadPackedIntDelta(baseline.RotationValueZ, compressionModel);
         RotationValueW = reader.ReadPackedIntDelta(baseline.RotationValueW, compressionModel);
     }
     else
     {
         RotationValueX = baseline.RotationValueX;
         RotationValueY = baseline.RotationValueY;
         RotationValueZ = baseline.RotationValueZ;
         RotationValueW = baseline.RotationValueW;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         TranslationValueX = reader.ReadPackedIntDelta(baseline.TranslationValueX, compressionModel);
         TranslationValueY = reader.ReadPackedIntDelta(baseline.TranslationValueY, compressionModel);
         TranslationValueZ = reader.ReadPackedIntDelta(baseline.TranslationValueZ, compressionModel);
     }
     else
     {
         TranslationValueX = baseline.TranslationValueX;
         TranslationValueY = baseline.TranslationValueY;
         TranslationValueZ = baseline.TranslationValueZ;
     }
 }
Example #28
0
 public void Deserialize(uint tick, ref Weapon_TerraformerSnapshotData baseline, DataStreamReader reader, ref DataStreamReader.Context ctx,
                         NetworkCompressionModel compressionModel)
 {
     this.tick   = tick;
     changeMask0 = reader.ReadPackedUIntDelta(ref ctx, baseline.changeMask0, compressionModel);
     if ((changeMask0 & (1 << 0)) != 0)
     {
         ItemInputStateowner = reader.ReadPackedIntDelta(ref ctx, baseline.ItemInputStateowner, compressionModel);
     }
     else
     {
         ItemInputStateowner = baseline.ItemInputStateowner;
     }
     if ((changeMask0 & (1 << 1)) != 0)
     {
         ItemInputStateslot = reader.ReadPackedUIntDelta(ref ctx, baseline.ItemInputStateslot, compressionModel);
     }
     else
     {
         ItemInputStateslot = baseline.ItemInputStateslot;
     }
     if ((changeMask0 & (1 << 2)) != 0)
     {
         ItemInputStateplayerId = reader.ReadPackedIntDelta(ref ctx, baseline.ItemInputStateplayerId, compressionModel);
     }
     else
     {
         ItemInputStateplayerId = baseline.ItemInputStateplayerId;
     }
     if ((changeMask0 & (1 << 3)) != 0)
     {
         Child0AbilityAbilityActionaction = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAbilityActionaction, compressionModel);
     }
     else
     {
         Child0AbilityAbilityActionaction = baseline.Child0AbilityAbilityActionaction;
     }
     if ((changeMask0 & (1 << 4)) != 0)
     {
         Child0AbilityAbilityActionactionStartTick = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAbilityActionactionStartTick, compressionModel);
     }
     else
     {
         Child0AbilityAbilityActionactionStartTick = baseline.Child0AbilityAbilityActionactionStartTick;
     }
     if ((changeMask0 & (1 << 5)) != 0)
     {
         Child0AbilityAbilityControlbehaviorState = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAbilityControlbehaviorState, compressionModel);
     }
     else
     {
         Child0AbilityAbilityControlbehaviorState = baseline.Child0AbilityAbilityControlbehaviorState;
     }
     if ((changeMask0 & (1 << 6)) != 0)
     {
         Child0AbilityAbilityControlrequestDeactivate = reader.ReadPackedUIntDelta(ref ctx, baseline.Child0AbilityAbilityControlrequestDeactivate, compressionModel);
     }
     else
     {
         Child0AbilityAbilityControlrequestDeactivate = baseline.Child0AbilityAbilityControlrequestDeactivate;
     }
     if ((changeMask0 & (1 << 7)) != 0)
     {
         Child0AbilityAutoRifleInterpolatedStatefireTick = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStatefireTick, compressionModel);
     }
     else
     {
         Child0AbilityAutoRifleInterpolatedStatefireTick = baseline.Child0AbilityAutoRifleInterpolatedStatefireTick;
     }
     if ((changeMask0 & (1 << 8)) != 0)
     {
         Child0AbilityAutoRifleInterpolatedStatefireEndPosX = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosX, compressionModel);
         Child0AbilityAutoRifleInterpolatedStatefireEndPosY = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosY, compressionModel);
         Child0AbilityAutoRifleInterpolatedStatefireEndPosZ = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosZ, compressionModel);
     }
     else
     {
         Child0AbilityAutoRifleInterpolatedStatefireEndPosX = baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosX;
         Child0AbilityAutoRifleInterpolatedStatefireEndPosY = baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosY;
         Child0AbilityAutoRifleInterpolatedStatefireEndPosZ = baseline.Child0AbilityAutoRifleInterpolatedStatefireEndPosZ;
     }
     if ((changeMask0 & (1 << 9)) != 0)
     {
         Child0AbilityAutoRifleInterpolatedStateimpactType = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStateimpactType, compressionModel);
     }
     else
     {
         Child0AbilityAutoRifleInterpolatedStateimpactType = baseline.Child0AbilityAutoRifleInterpolatedStateimpactType;
     }
     if ((changeMask0 & (1 << 10)) != 0)
     {
         Child0AbilityAutoRifleInterpolatedStateimpactNormalX = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalX, compressionModel);
         Child0AbilityAutoRifleInterpolatedStateimpactNormalY = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalY, compressionModel);
         Child0AbilityAutoRifleInterpolatedStateimpactNormalZ = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalZ, compressionModel);
     }
     else
     {
         Child0AbilityAutoRifleInterpolatedStateimpactNormalX = baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalX;
         Child0AbilityAutoRifleInterpolatedStateimpactNormalY = baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalY;
         Child0AbilityAutoRifleInterpolatedStateimpactNormalZ = baseline.Child0AbilityAutoRifleInterpolatedStateimpactNormalZ;
     }
     if ((changeMask0 & (1 << 11)) != 0)
     {
         Child0AbilityAutoRiflePredictedStateaction = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRiflePredictedStateaction, compressionModel);
     }
     else
     {
         Child0AbilityAutoRiflePredictedStateaction = baseline.Child0AbilityAutoRiflePredictedStateaction;
     }
     if ((changeMask0 & (1 << 12)) != 0)
     {
         Child0AbilityAutoRiflePredictedStatephaseStartTick = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRiflePredictedStatephaseStartTick, compressionModel);
     }
     else
     {
         Child0AbilityAutoRiflePredictedStatephaseStartTick = baseline.Child0AbilityAutoRiflePredictedStatephaseStartTick;
     }
     if ((changeMask0 & (1 << 13)) != 0)
     {
         Child0AbilityAutoRiflePredictedStateammoInClip = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRiflePredictedStateammoInClip, compressionModel);
     }
     else
     {
         Child0AbilityAutoRiflePredictedStateammoInClip = baseline.Child0AbilityAutoRiflePredictedStateammoInClip;
     }
     if ((changeMask0 & (1 << 14)) != 0)
     {
         Child0AbilityAutoRiflePredictedStateCOF = reader.ReadPackedIntDelta(ref ctx, baseline.Child0AbilityAutoRiflePredictedStateCOF, compressionModel);
     }
     else
     {
         Child0AbilityAutoRiflePredictedStateCOF = baseline.Child0AbilityAutoRiflePredictedStateCOF;
     }
 }