static CompressionBasic()
 {
     CompressionBasic.LowResLocalPositionCompressionInfo = new CompressionInfo.Float(-32f, 32f, 12);
     CompressionBasic.ByteCompressionInfo             = new CompressionInfo.Integer(0, 8);
     CompressionBasic.PlayerCompressionInfo           = new CompressionInfo.Integer(-1, 8);
     CompressionBasic.PeerComponentCompressionInfo    = new CompressionInfo.UnsignedInteger(0U, 32);
     CompressionBasic.GUIDCompressionInfo             = new CompressionInfo.UnsignedInteger(0U, 32);
     CompressionBasic.FlagsCompressionInfo            = new CompressionInfo.Integer(0, 30);
     CompressionBasic.GUIDIntCompressionInfo          = new CompressionInfo.Integer(-1, 31);
     CompressionBasic.RPCBufferSizeCompressionInfo    = new CompressionInfo.Integer(0, 30);
     CompressionBasic.MissionObjectIDCompressionInfo  = new CompressionInfo.Integer(-1, 4095, true);
     CompressionBasic.UnitVectorCompressionInfo       = new CompressionInfo.Float(-1.024f, 10, 1f / 500f);
     CompressionBasic.LowResRadianCompressionInfo     = new CompressionInfo.Float(-3.151593f, 3.151593f, 8);
     CompressionBasic.RadianCompressionInfo           = new CompressionInfo.Float(-3.151593f, 3.151593f, 10);
     CompressionBasic.HighResRadianCompressionInfo    = new CompressionInfo.Float(-3.151593f, 3.151593f, 13);
     CompressionBasic.UltResRadianCompressionInfo     = new CompressionInfo.Float(-3.151593f, 3.151593f, 30);
     CompressionBasic.ScaleCompressionInfo            = new CompressionInfo.Float(-1f / 1000f, 10, 0.01f);
     CompressionBasic.LowResQuaternionCompressionInfo = new CompressionInfo.Float(-0.7071068f, 0.7071068f, 6);
     CompressionBasic.OmittedQuaternionComponentIndexCompressionInfo = new CompressionInfo.Integer(0, 3, true);
     CompressionBasic.ImpulseCompressionInfo                         = new CompressionInfo.Float(-500f, 16, 0.0153f);
     CompressionBasic.AnimationKeyCompressionInfo                    = new CompressionInfo.Integer(0, 8000, true);
     CompressionBasic.AnimationSpeedCompressionInfo                  = new CompressionInfo.Float(0.0f, 9, 0.01f);
     CompressionBasic.AnimationProgressCompressionInfo               = new CompressionInfo.Float(0.0f, 1.01f, 7);
     CompressionBasic.VertexAnimationSpeedCompressionInfo            = new CompressionInfo.Float(0.0f, 9, 0.1f);
     CompressionBasic.ItemDataCompressionInfo                        = new CompressionInfo.Integer(0, 1023, true);
     CompressionBasic.PercentageCompressionInfo                      = new CompressionInfo.Integer(0, 100, true);
     CompressionBasic.FloatPercentageCompressionInfo                 = new CompressionInfo.Integer(0, 10000, true);
     CompressionBasic.DebugIntNonCompressionInfo                     = new CompressionInfo.Integer(int.MinValue, 32);
     CompressionBasic.DebugULongNonCompressionInfo                   = new CompressionInfo.UnsignedLongInteger(0UL, 64);
     CompressionBasic.AgentAgeCompressionInfo                        = new CompressionInfo.Float(0.0f, 128f, 10);
     CompressionBasic.FaceKeyDataCompressionInfo                     = new CompressionInfo.Float(0.0f, 1f, 10);
     CompressionBasic.EntityChildCountCompressionInfo                = new CompressionInfo.Integer(-1, (int)sbyte.MaxValue, true);
     CompressionBasic.AgentHitDamageCompressionInfo                  = new CompressionInfo.Integer(0, 2000, true);
     CompressionBasic.AgentHitRelativeSpeedCompressionInfo           = new CompressionInfo.Float(0.0f, 17, 0.01f);
     CompressionBasic.AgentHitArmorCompressionInfo                   = new CompressionInfo.Integer(0, 200, true);
     CompressionBasic.AgentHitBoneIndexCompressionInfo               = new CompressionInfo.Integer(-1, 63, true);
     CompressionBasic.AgentHitBodyPartCompressionInfo                = new CompressionInfo.Integer(-1, 11, true);
     CompressionBasic.AgentHitDamageTypeCompressionInfo              = new CompressionInfo.Integer(-1, 3, true);
     CompressionBasic.RoundGoldAmountCompressionInfo                 = new CompressionInfo.Integer(-1, 2000, true);
     CompressionBasic.PlayerChosenBadgeCompressionInfo               = new CompressionInfo.Integer(-1, 6);
     CompressionBasic.MaxNumberOfPlayersCompressionInfo              = new CompressionInfo.Integer(MultiplayerOptions.OptionType.MaxNumberOfPlayers.GetMinimumValue(), MultiplayerOptions.OptionType.MaxNumberOfPlayers.GetMaximumValue(), true);
     CompressionBasic.MinNumberOfPlayersForMatchStartCompressionInfo = new CompressionInfo.Integer(MultiplayerOptions.OptionType.MinNumberOfPlayersForMatchStart.GetMinimumValue(), MultiplayerOptions.OptionType.MinNumberOfPlayersForMatchStart.GetMaximumValue(), true);
     CompressionBasic.MapTimeLimitCompressionInfo                    = new CompressionInfo.Integer(MultiplayerOptions.OptionType.MapTimeLimit.GetMinimumValue(), MultiplayerOptions.OptionType.MapTimeLimit.GetMaximumValue(), true);
     CompressionBasic.RoundTotalCompressionInfo                      = new CompressionInfo.Integer(MultiplayerOptions.OptionType.RoundTotal.GetMinimumValue(), MultiplayerOptions.OptionType.RoundTotal.GetMaximumValue(), true);
     CompressionBasic.RoundTimeLimitCompressionInfo                  = new CompressionInfo.Integer(MultiplayerOptions.OptionType.RoundTimeLimit.GetMinimumValue(), MultiplayerOptions.OptionType.RoundTimeLimit.GetMaximumValue(), true);
     CompressionBasic.RoundPreparationTimeLimitCompressionInfo       = new CompressionInfo.Integer(MultiplayerOptions.OptionType.RoundPreparationTimeLimit.GetMinimumValue(), MultiplayerOptions.OptionType.RoundPreparationTimeLimit.GetMaximumValue(), true);
     CompressionBasic.RespawnPeriodCompressionInfo                   = new CompressionInfo.Integer(MultiplayerOptions.OptionType.RespawnPeriodTeam1.GetMinimumValue(), MultiplayerOptions.OptionType.RespawnPeriodTeam1.GetMaximumValue(), true);
     CompressionBasic.GoldGainChangePercentageCompressionInfo        = new CompressionInfo.Integer(MultiplayerOptions.OptionType.GoldGainChangePercentageTeam1.GetMinimumValue(), MultiplayerOptions.OptionType.GoldGainChangePercentageTeam1.GetMaximumValue(), true);
     CompressionBasic.SpectatorCameraTypeCompressionInfo             = new CompressionInfo.Integer(-1, 7, true);
     CompressionBasic.PollAcceptThresholdCompressionInfo             = new CompressionInfo.Integer(MultiplayerOptions.OptionType.PollAcceptThreshold.GetMinimumValue(), MultiplayerOptions.OptionType.PollAcceptThreshold.GetMaximumValue(), true);
     CompressionBasic.NumberOfBotsTeamCompressionInfo                = new CompressionInfo.Integer(MultiplayerOptions.OptionType.NumberOfBotsTeam1.GetMinimumValue(), MultiplayerOptions.OptionType.NumberOfBotsTeam1.GetMaximumValue(), true);
     CompressionBasic.NumberOfBotsPerFormationCompressionInfo        = new CompressionInfo.Integer(MultiplayerOptions.OptionType.NumberOfBotsPerFormation.GetMinimumValue(), MultiplayerOptions.OptionType.NumberOfBotsPerFormation.GetMaximumValue(), true);
     CompressionBasic.AutoTeamBalanceLimitCompressionInfo            = new CompressionInfo.Integer(0, 5, true);
     CompressionBasic.FriendlyFireDamageCompressionInfo              = new CompressionInfo.Integer(MultiplayerOptions.OptionType.FriendlyFireDamageMeleeFriendPercent.GetMinimumValue(), MultiplayerOptions.OptionType.FriendlyFireDamageMeleeFriendPercent.GetMaximumValue(), true);
     CompressionBasic.ForcedAvatarIndexCompressionInfo               = new CompressionInfo.Integer(-1, 100, true);
     CompressionBasic.IntermissionStateCompressionInfo               = new CompressionInfo.Integer(0, Enum.GetNames(typeof(MultiplayerIntermissionState)).Length, false);
     CompressionBasic.IntermissionTimerCompressionInfo               = new CompressionInfo.Float(0.0f, 240f, 14);
 }
 public virtual void WriteToNetwork()
 {
     GameNetworkMessage.WriteBoolToPacket(this.GameEntity.GetVisibilityExcludeParents());
     GameNetworkMessage.WriteBoolToPacket(this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchTransform));
     if (this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchTransform))
     {
         GameNetworkMessage.WriteMatrixFrameToPacket(this.GameEntity.GetFrame());
         GameNetworkMessage.WriteBoolToPacket(this._synchState == SynchedMissionObject.SynchState.SynchronizeFrameOverTime);
         if (this._synchState == SynchedMissionObject.SynchState.SynchronizeFrameOverTime)
         {
             GameNetworkMessage.WriteMatrixFrameToPacket(this._lastSynchedFrame);
             GameNetworkMessage.WriteFloatToPacket(this._duration - this._timer, CompressionMission.FlagCapturePointDurationCompressionInfo);
         }
     }
     if ((NativeObject)this.GameEntity.Skeleton != (NativeObject)null)
     {
         string animationAtChannel = this.GameEntity.Skeleton.GetAnimationAtChannel(0);
         int    num = !string.IsNullOrEmpty(animationAtChannel) ? 1 : 0;
         GameNetworkMessage.WriteBoolToPacket(num != 0 && this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchAnimation));
         if (num != 0 && this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchAnimation))
         {
             int    animationIndexWithName  = MBAnimation.GetAnimationIndexWithName(animationAtChannel);
             double animationSpeedAtChannel = (double)this.GameEntity.Skeleton.GetAnimationSpeedAtChannel(0);
             GameNetworkMessage.WriteIntToPacket(animationIndexWithName, CompressionBasic.AnimationIndexCompressionInfo);
             CompressionInfo.Float speedCompressionInfo = CompressionBasic.AnimationSpeedCompressionInfo;
             GameNetworkMessage.WriteFloatToPacket((float)animationSpeedAtChannel, speedCompressionInfo);
             GameNetworkMessage.WriteFloatToPacket(this.GameEntity.Skeleton.GetAnimationParameterAtChannel(0), CompressionBasic.UnitVectorCompressionInfo);
             GameNetworkMessage.WriteBoolToPacket(this.GameEntity.IsSkeletonAnimationPaused());
         }
     }
     GameNetworkMessage.WriteBoolToPacket(this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SyncColors));
     if (this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SyncColors))
     {
         GameNetworkMessage.WriteUintToPacket(this.Color, CompressionGeneric.ColorCompressionInfo);
         GameNetworkMessage.WriteUintToPacket(this.Color2, CompressionGeneric.ColorCompressionInfo);
     }
     GameNetworkMessage.WriteBoolToPacket(this.IsDisabled);
 }