protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissileIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MissileCompressionInfo, ref bufferReadValid);
            this.Agent        = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.WeaponIndex  = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WieldSlotCompressionInfo, ref bufferReadValid);
            if (this.WeaponIndex == EquipmentIndex.None)
            {
                this.Weapon = ModuleNetworkData.ReadMissileWeaponReferenceFromPacket(Game.Current.ObjectManager, ref bufferReadValid);
            }
            this.Position     = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            this.Direction    = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            this.Speed        = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.MissileSpeedCompressionInfo, ref bufferReadValid);
            this.HasRigidBody = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            if (this.HasRigidBody)
            {
                this.Orientation           = GameNetworkMessage.ReadRotationMatrixFromPacket(ref bufferReadValid);
                this.MissionObjectToIgnore = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            }
            else
            {
                Vec3 f = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
                this.Orientation = new Mat3(Vec3.Side, f, Vec3.Up);
                this.Orientation.Orthonormalize();
            }
            this.IsPrimaryWeaponShot = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.UsableMachine = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMachine;
            this.Distance      = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #3
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Frame         = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.SpawnedItemEntity = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.ConsumedAmount    = (short)GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.ItemDataValueCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #5
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.StonePile = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as StonePile;
            this.AmmoCount = GameNetworkMessage.ReadIntFromPacket(CompressionMission.RangedSiegeWeaponAmmoCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Progress      = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Hitpoints     = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.UsableGameObjectHealthCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.UsableGameObject     = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMissionObject;
            this.IsDisabledForPlayers = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #9
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent            = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.UsableGameObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMissionObject;
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.RangedSiegeWeapon = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as RangedSiegeWeapon;
            this.State             = (RangedSiegeWeapon.WeaponState)GameNetworkMessage.ReadIntFromPacket(CompressionMission.RangedSiegeWeaponStateCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.UsableGameObject          = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMissionObject;
            this.UsedObjectPreferenceIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WieldSlotCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #12
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.SiegeLadder = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as SiegeLadder;
            this.State       = (SiegeLadder.LadderState)GameNetworkMessage.ReadIntFromPacket(CompressionMission.SiegeLadderStateCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #13
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.SpawnedWeapon   = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as SpawnedItemEntity;
            this.AttachmentIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponAttachmentIndexCompressionInfo, ref bufferReadValid);
            this.ForcedIndex     = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #14
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject   = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.BodyFlags       = (BodyFlags)GameNetworkMessage.ReadIntFromPacket(CompressionBasic.FlagsCompressionInfo, ref bufferReadValid);
            this.ApplyToChildren = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Frame         = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid);
            this.Duration      = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.FlagCapturePointDurationCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #16
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.ObjectId = GameNetworkMessage.ReadMissionObjectIdFromPacket(ref bufferReadValid);
            this.Parent   = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Frame    = GameNetworkMessage.ReadNonUniformTransformFromPacket(CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.Color         = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid);
            this.Color2        = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.UsableMachine      = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMachine;
            this.HorizontalRotation = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.HighResRadianCompressionInfo, ref bufferReadValid);
            this.VerticalRotation   = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.HighResRadianCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.LocalSpace    = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.Position      = GameNetworkMessage.ReadVec3FromPacket(this.LocalSpace ? CompressionBasic.LocalPositionCompressionInfo : CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            this.Impulse       = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.ImpulseCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #20
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent             = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
            this.SpawnedItemEntity = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as SpawnedItemEntity;
            this.SlotIndex         = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid);
            this.RemoveWeapon      = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #21
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject  = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.ChannelNo      = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? 1 : 0;
            this.AnimationIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.AnimationIndexCompressionInfo, ref bufferReadValid);
            this.AnimationSpeed = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.AnimationSpeedCompressionInfo, ref bufferReadValid) : 1f;
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.BeginKey      = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.AnimationKeyCompressionInfo, ref bufferReadValid);
            this.EndKey        = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.AnimationKeyCompressionInfo, ref bufferReadValid);
            this.Speed         = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.VertexAnimationSpeedCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject    = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.DestructionLevel = GameNetworkMessage.ReadIntFromPacket(CompressionMission.UsableGameObjectDestructionStateCompressionInfo, ref bufferReadValid);
            this.ForcedIndex      = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid) : -1;
            this.BlowMagnitude    = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.UsableGameObjectBlowMagnitude, ref bufferReadValid);
            this.BlowPosition     = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            this.BlowDirection    = GameNetworkMessage.ReadVec3FromPacket(CompressionMission.UsableGameObjectBlowDirection, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Weapon              = ModuleNetworkData.ReadWeaponReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
            this.Frame               = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid);
            this.WeaponSpawnFlags    = (Mission.WeaponSpawnFlags)GameNetworkMessage.ReadIntFromPacket(CompressionMission.SpawnedItemWeaponSpawnFlagCompressionInfo, ref bufferReadValid);
            this.ForcedIndex         = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            this.ParentMissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            this.IsVisible           = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.HasLifeTime         = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            bool flag = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);

            if (bufferReadValid)
            {
                this.ChannelNo = flag ? 1 : 0;
            }
            this.Parameter = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
예제 #26
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Weapon        = ModuleNetworkData.ReadWeaponReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            Vec3 o   = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.LocalPositionCompressionInfo, ref bufferReadValid);
            Mat3 rot = GameNetworkMessage.ReadRotationMatrixFromPacket(ref bufferReadValid);

            if (bufferReadValid)
            {
                this.AttachLocalFrame = new MatrixFrame(rot, o);
            }
            return(bufferReadValid);
        }
예제 #27
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
            Vec3 s             = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            Vec3 f             = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            Vec3 u             = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid);
            Vec3 scalingVector = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.ScaleCompressionInfo, ref bufferReadValid);
            Vec3 o             = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);

            if (bufferReadValid)
            {
                this.Frame = new MatrixFrame(new Mat3(s, f, u), o);
                this.Frame.Scale(scalingVector);
            }
            return(bufferReadValid);
        }
예제 #28
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.MissileIndex          = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MissileCompressionInfo, ref bufferReadValid);
            this.CollisionReaction     = (Mission.MissileCollisionReaction)GameNetworkMessage.ReadIntFromPacket(CompressionMission.MissileCollisionReactionCompressionInfo, ref bufferReadValid);
            this.AttackerAgent         = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
            this.AttachedAgent         = (Agent)null;
            this.AttachedToShield      = false;
            this.AttachedBoneIndex     = (sbyte)-1;
            this.AttachedMissionObject = (MissionObject)null;
            if (this.CollisionReaction == Mission.MissileCollisionReaction.Stick || this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
            {
                if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid))
                {
                    this.AttachedAgent    = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
                    this.AttachedToShield = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
                    if (!this.AttachedToShield)
                    {
                        this.AttachedBoneIndex = (sbyte)GameNetworkMessage.ReadIntFromPacket(CompressionMission.BoneIndexCompressionInfo, ref bufferReadValid);
                    }
                }
                else
                {
                    this.AttachedMissionObject = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid);
                }
            }
            this.AttachLocalFrame = this.CollisionReaction == Mission.MissileCollisionReaction.BecomeInvisible || this.CollisionReaction == Mission.MissileCollisionReaction.PassThrough ? MatrixFrame.Identity : (!GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? GameNetworkMessage.ReadNonUniformTransformFromPacket(CompressionBasic.PositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo, ref bufferReadValid) : GameNetworkMessage.ReadNonUniformTransformFromPacket(CompressionBasic.BigRangeLowResLocalPositionCompressionInfo, CompressionBasic.LowResQuaternionCompressionInfo, ref bufferReadValid));
            if (this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
            {
                this.BounceBackVelocity        = GameNetworkMessage.ReadVec3FromPacket(CompressionMission.SpawnedItemVelocityCompressionInfo, ref bufferReadValid);
                this.BounceBackAngularVelocity = GameNetworkMessage.ReadVec3FromPacket(CompressionMission.SpawnedItemAngularVelocityCompressionInfo, ref bufferReadValid);
            }
            else
            {
                this.BounceBackVelocity        = Vec3.Zero;
                this.BounceBackAngularVelocity = Vec3.Zero;
            }
            if (this.CollisionReaction == Mission.MissileCollisionReaction.Stick || this.CollisionReaction == Mission.MissileCollisionReaction.BounceBack)
            {
                this.ForcedSpawnIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            }
            return(bufferReadValid);
        }