예제 #1
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)
     {
         MovableCubeComponentPlayerId = reader.ReadPackedIntDelta(baseline.MovableCubeComponentPlayerId, compressionModel);
     }
     else
     {
         MovableCubeComponentPlayerId = baseline.MovableCubeComponentPlayerId;
     }
     if ((changeMask0 & (1 << 1)) != 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 << 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;
     }
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 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;
     }
 }
예제 #4
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;
     }
 }
예제 #5
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;
     }
 }
예제 #6
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;
     }
 }
예제 #7
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;
     }
 }
예제 #8
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;
     }
 }
예제 #9
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;
     }
 }
예제 #10
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;
     }
 }
예제 #11
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;
     }
 }
예제 #12
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;
            }
        }
    }