Пример #1
0
 protected override void OnWrite()
 {
     ModuleNetworkData.WriteWeaponReferenceToPacket(this.Weapon);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteVec3ToPacket(this.AttachLocalFrame.origin, CompressionBasic.LocalPositionCompressionInfo);
     GameNetworkMessage.WriteRotationMatrixToPacket(this.AttachLocalFrame.rotation);
 }
 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);
 }
Пример #3
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.SpawnedItemEntity);
     GameNetworkMessage.WriteIntToPacket((int)this.SlotIndex, CompressionMission.ItemSlotCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket(this.RemoveWeapon);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.LocalSpace);
     GameNetworkMessage.WriteVec3ToPacket(this.Position, this.LocalSpace ? CompressionBasic.LocalPositionCompressionInfo : CompressionBasic.PositionCompressionInfo);
     GameNetworkMessage.WriteVec3ToPacket(this.Impulse, CompressionBasic.ImpulseCompressionInfo);
 }
 protected override void OnWrite()
 {
     ModuleNetworkData.WriteWeaponReferenceToPacket(this.Weapon);
     GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame);
     GameNetworkMessage.WriteIntToPacket((int)this.WeaponSpawnFlags, CompressionMission.SpawnedItemWeaponSpawnFlagCompressionInfo);
     GameNetworkMessage.WriteIntToPacket(this.ForcedIndex, CompressionBasic.MissionObjectIDCompressionInfo);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.ParentMissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.IsVisible);
     GameNetworkMessage.WriteBoolToPacket(this.HasLifeTime);
 }
Пример #6
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);
 }
Пример #7
0
        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);
        }
 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);
 }
Пример #9
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteIntToPacket(this.MissileIndex, CompressionMission.MissileCompressionInfo);
     GameNetworkMessage.WriteIntToPacket((int)this.CollisionReaction, CompressionMission.MissileCollisionReactionCompressionInfo);
     GameNetworkMessage.WriteAgentReferenceToPacket(this.AttackerAgent);
     if (this.CollisionReaction == Mission.MissileCollisionReaction.Stick || this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
     {
         int num = this.AttachedAgent != null ? 1 : 0;
         GameNetworkMessage.WriteBoolToPacket(num != 0);
         if (num != 0)
         {
             GameNetworkMessage.WriteAgentReferenceToPacket(this.AttachedAgent);
             GameNetworkMessage.WriteBoolToPacket(this.AttachedToShield);
             if (!this.AttachedToShield)
             {
                 GameNetworkMessage.WriteIntToPacket((int)this.AttachedBoneIndex, CompressionMission.BoneIndexCompressionInfo);
             }
         }
         else
         {
             GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.AttachedMissionObject);
         }
     }
     if (this.CollisionReaction != Mission.MissileCollisionReaction.BecomeInvisible && this.CollisionReaction != Mission.MissileCollisionReaction.PassThrough)
     {
         int num = this.AttachedAgent != null ? 1 : (this.AttachedMissionObject != null ? 1 : 0);
         GameNetworkMessage.WriteBoolToPacket(num != 0);
         if (num != 0)
         {
             GameNetworkMessage.WriteNonUniformTransformToPacket(this.AttachLocalFrame, CompressionBasic.BigRangeLowResLocalPositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
         }
         else
         {
             GameNetworkMessage.WriteNonUniformTransformToPacket(this.AttachLocalFrame, CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
         }
     }
     if (this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
     {
         GameNetworkMessage.WriteVec3ToPacket(this.BounceBackVelocity, CompressionMission.SpawnedItemVelocityCompressionInfo);
         GameNetworkMessage.WriteVec3ToPacket(this.BounceBackAngularVelocity, CompressionMission.SpawnedItemAngularVelocityCompressionInfo);
     }
     if (this.CollisionReaction != Mission.MissileCollisionReaction.Stick && this.CollisionReaction != Mission.MissileCollisionReaction.BounceBack)
     {
         return;
     }
     GameNetworkMessage.WriteIntToPacket(this.ForcedSpawnIndex, CompressionBasic.MissionObjectIDCompressionInfo);
 }
 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(this.Progress, CompressionBasic.UnitVectorCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableGameObject);
     GameNetworkMessage.WriteBoolToPacket(this.IsDisabledForPlayers);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.ChannelNo == 1);
     GameNetworkMessage.WriteFloatToPacket(this.Parameter, CompressionBasic.UnitVectorCompressionInfo);
 }
Пример #14
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableGameObject);
 }
Пример #15
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.RangedSiegeWeapon);
     GameNetworkMessage.WriteIntToPacket(this.Index, CompressionMission.RangedSiegeWeaponAmmoIndexCompressionInfo);
 }
Пример #16
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.SpawnedWeapon);
     GameNetworkMessage.WriteIntToPacket(this.AttachmentIndex, CompressionMission.WeaponAttachmentIndexCompressionInfo);
     GameNetworkMessage.WriteIntToPacket(this.ForcedIndex, CompressionBasic.MissionObjectIDCompressionInfo);
 }
Пример #17
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectIdToPacket(this.ObjectId);
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.Parent);
     GameNetworkMessage.WriteNonUniformTransformToPacket(this.Frame, CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo);
 }
Пример #18
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteBoolToPacket(this.Visible);
 }
Пример #19
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.SiegeLadder);
     GameNetworkMessage.WriteIntToPacket((int)this.State, CompressionMission.SiegeLadderStateCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableMachine);
     GameNetworkMessage.WriteFloatToPacket(this.HorizontalRotation, CompressionBasic.HighResRadianCompressionInfo);
     GameNetworkMessage.WriteFloatToPacket(this.VerticalRotation, CompressionBasic.HighResRadianCompressionInfo);
 }
Пример #21
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteIntToPacket((int)this.BodyFlags, CompressionBasic.FlagsCompressionInfo);
     GameNetworkMessage.WriteBoolToPacket(this.ApplyToChildren);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableGameObject);
     GameNetworkMessage.WriteIntToPacket(this.UsedObjectPreferenceIndex, CompressionMission.WieldSlotCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame);
     GameNetworkMessage.WriteFloatToPacket(this.Duration, CompressionMission.FlagCapturePointDurationCompressionInfo);
 }
Пример #24
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.StonePile);
     GameNetworkMessage.WriteIntToPacket(this.AmmoCount, CompressionMission.RangedSiegeWeaponAmmoCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.SpawnedItemEntity);
     GameNetworkMessage.WriteIntToPacket((int)this.ConsumedAmount, CompressionGeneric.ItemDataValueCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteFloatToPacket(Math.Max(this.Hitpoints, 0.0f), CompressionMission.UsableGameObjectHealthCompressionInfo);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket((MissionObject)this.UsableMachine);
     GameNetworkMessage.WriteFloatToPacket(this.Distance, CompressionBasic.PositionCompressionInfo);
 }
Пример #28
0
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame);
 }
 protected override void OnWrite()
 {
     GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject);
     GameNetworkMessage.WriteUintToPacket(this.Color, CompressionGeneric.ColorCompressionInfo);
     GameNetworkMessage.WriteUintToPacket(this.Color2, CompressionGeneric.ColorCompressionInfo);
 }