protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteIntToPacket(this.BeginKey, CompressionBasic.AnimationKeyCompressionInfo);
     GameNetworkMessage.WriteIntToPacket(this.EndKey, CompressionBasic.AnimationKeyCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.Speed, CompressionBasic.VertexAnimationSpeedCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket((int)this.CurrentState, CompressionMatchmaker.MissionCurrentStateCompressionInfo);
     if (this.CurrentState == MissionLobbyComponent.MultiplayerGameState.WaitingFirstPlayers)
     {
         return;
     }
     GameNetworkMessage.WriteFloatToPacket(this.StateStartTimeInSeconds, CompressionMatchmaker.MissionTimeCompressionInfo);
 }
Esempio n. 3
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteFloatToPacket(this.Progress, CompressionMission.FlagClassicProgressCompressionInfo);
     GameNetworkMessage.WriteIntToPacket((int)this.Direction, CompressionMission.FlagDirectionEnumCompressionInfo);
     if (this.Direction == CaptureTheFlagFlagDirection.None || this.Direction == CaptureTheFlagFlagDirection.Static)
     {
         return;
     }
     GameNetworkMessage.WriteFloatToPacket(this.Speed, CompressionMission.FlagSpeedCompressionInfo);
 }
Esempio n. 4
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteActionSetReferenceToPacket(this.ActionSet, CompressionMission.ActionSetCompressionInfo);
     GameNetworkMessage.WriteIntToPacket(this.NumPaces, CompressionMission.NumberOfPacesCompressionInfo);
     GameNetworkMessage.WriteIntToPacket(this.MonsterUsageSetIndex, CompressionMission.MonsterUsageSetCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.WalkingSpeedLimit, CompressionMission.WalkingSpeedLimitCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.CrouchWalkingSpeedLimit, CompressionMission.WalkingSpeedLimitCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.StepSize, CompressionMission.StepSizeCompressionInfo);
 }
Esempio n. 5
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.ChannelNo == 1);
     GameNetworkMessage.WriteIntToPacket(this.AnimationIndex, CompressionBasic.AnimationIndexCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket((double)this.AnimationSpeed != 1.0);
     if ((double)this.AnimationSpeed == 1.0)
     {
         return;
     }
     GameNetworkMessage.WriteFloatToPacket(this.AnimationSpeed, CompressionBasic.AnimationSpeedCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteIntToPacket(this.DestructionLevel, CompressionMission.UsableGameObjectDestructionStateCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket(this.ForcedIndex != -1);
     if (this.ForcedIndex != -1)
     {
         GameNetworkMessage.WriteIntToPacket(this.ForcedIndex, CompressionBasic.MissionObjectIDCompressionInfo);
     }
     GameNetworkMessage.WriteFloatToPacket(this.BlowMagnitude, CompressionMission.UsableGameObjectBlowMagnitude);
     GameNetworkMessage.WriteVec3ToPacket(this.BlowPosition, CompressionBasic.PositionCompressionInfo);
     GameNetworkMessage.WriteVec3ToPacket(this.BlowDirection, CompressionMission.UsableGameObjectBlowDirection);
 }
        protected override void OnWrite()
        {
            Vec3        scaleVector = this.Frame.rotation.GetScaleVector();
            MatrixFrame frame       = this.Frame;

            frame.Scale(new Vec3(1f / scaleVector.x, 1f / scaleVector.y, 1f / scaleVector.z));
            GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
            GameNetworkMessage.WriteVec3ToPacket(frame.rotation.f, CompressionBasic.UnitVectorCompressionInfo);
            GameNetworkMessage.WriteVec3ToPacket(frame.rotation.s, CompressionBasic.UnitVectorCompressionInfo);
            GameNetworkMessage.WriteVec3ToPacket(frame.rotation.u, CompressionBasic.UnitVectorCompressionInfo);
            GameNetworkMessage.WriteVec3ToPacket(scaleVector, CompressionBasic.ScaleCompressionInfo);
            GameNetworkMessage.WriteVec3ToPacket(frame.origin, CompressionBasic.PositionCompressionInfo);
            GameNetworkMessage.WriteFloatToPacket(this.Duration, CompressionMission.FlagCapturePointDurationCompressionInfo);
        }
 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);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket(this.MissileIndex, CompressionMission.MissileCompressionInfo);
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteIntToPacket((int)this.WeaponIndex, CompressionMission.WieldSlotCompressionInfo);
     if (this.WeaponIndex == EquipmentIndex.None)
     {
         ModuleNetworkData.WriteMissileWeaponReferenceToPacket(this.Weapon);
     }
     GameNetworkMessage.WriteVec3ToPacket(this.Position, CompressionBasic.PositionCompressionInfo);
     GameNetworkMessage.WriteVec3ToPacket(this.Direction, CompressionBasic.UnitVectorCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.Speed, CompressionMission.MissileSpeedCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket(this.HasRigidBody);
     if (this.HasRigidBody)
     {
         GameNetworkMessage.WriteRotationMatrixToPacket(this.Orientation);
         GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObjectToIgnore);
     }
     else
     {
         GameNetworkMessage.WriteVec3ToPacket(this.Orientation.f, CompressionBasic.UnitVectorCompressionInfo);
     }
     GameNetworkMessage.WriteBoolToPacket(this.IsPrimaryWeaponShot);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteFloatToPacket(Math.Max(this.Hitpoints, 0.0f), CompressionMission.UsableGameObjectHealthCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket((int)this.IntermissionState, CompressionBasic.IntermissionStateCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.IntermissionTimer, CompressionBasic.IntermissionTimerCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket((int)this.WarmupState, CompressionMission.MissionRoundStateCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.StateStartTimeInSeconds, CompressionMatchmaker.MissionTimeCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteAgentReferenceToPacket(this.AgentToTest);
     GameNetworkMessage.WriteFloatToPacket(this.ScaleToTest, CompressionMission.DebugScaleValueCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableMachine);
     GameNetworkMessage.WriteFloatToPacket(this.Distance, CompressionBasic.PositionCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteFloatToPacket(this.Progress, CompressionBasic.UnitVectorCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.ChannelNo == 1);
     GameNetworkMessage.WriteFloatToPacket(this.Parameter, CompressionBasic.UnitVectorCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame);
     GameNetworkMessage.WriteFloatToPacket(this.Duration, CompressionMission.FlagCapturePointDurationCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableMachine);
     GameNetworkMessage.WriteFloatToPacket(this.HorizontalRotation, CompressionBasic.HighResRadianCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.VerticalRotation, CompressionBasic.HighResRadianCompressionInfo);
 }