protected override bool OnRead()
 {
   bool bufferReadValid = true;
   this.Agent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
   this.IsSuccessful = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
   return bufferReadValid;
 }
        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);
        }
Exemple #3
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.AgentToTest = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
            this.ScaleToTest = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.DebugScaleValueCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent     = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.SlotIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent  = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.Health = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentHealthCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #7
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.OrderType = (OrderType)GameNetworkMessage.ReadIntFromPacket(CompressionOrder.OrderTypeCompressionInfo, ref bufferReadValid);
            this.Agent     = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent    = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.Position = GameNetworkMessage.ReadVec2FromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #9
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.RequesterAgent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.RequestedAgent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #10
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent           = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.IsKilled        = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.ActionCodeIndex = new ActionIndexCache(GameNetworkMessage.ReadIntFromPacket(CompressionBasic.ActionCodeCompressionInfo, ref bufferReadValid));
            return(bufferReadValid);
        }
Exemple #11
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent     = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
            this.Weapon    = ModuleNetworkData.ReadWeaponReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
            this.SlotIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #12
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent      = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.PrefabName = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid);
            this.BoneIndex  = (sbyte)GameNetworkMessage.ReadIntFromPacket(CompressionMission.BoneIndexCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent          = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.ComponentIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentPrefabComponentIndexCompressionInfo, ref bufferReadValid);
            this.Visibility     = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent         = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.AttachedIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponAttachmentIndexCompressionInfo, ref bufferReadValid);
            this.ForcedIndex   = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent          = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.EquipmentIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid);
            this.UsageIndex     = (int)(short)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponUsageIndexCompressionInfo, ref bufferReadValid);
            this.CurrentMovementFlagUsageDirection = (Agent.UsageDirection)GameNetworkMessage.ReadIntFromPacket(CompressionMission.UsageDirectionCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #16
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);
        }
Exemple #17
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent                     = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.IsLeftHand                = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.IsWieldedInstantly        = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.IsWieldedOnSpawn          = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.WieldedItemIndex          = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WieldSlotCompressionInfo, ref bufferReadValid);
            this.MainHandCurrentUsageIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponUsageIndexCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
Exemple #18
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent                   = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.ActionSet               = GameNetworkMessage.ReadActionSetReferenceFromPacket(CompressionMission.ActionSetCompressionInfo, ref bufferReadValid);
            this.NumPaces                = GameNetworkMessage.ReadIntFromPacket(CompressionMission.NumberOfPacesCompressionInfo, ref bufferReadValid);
            this.MonsterUsageSetIndex    = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MonsterUsageSetCompressionInfo, ref bufferReadValid);
            this.WalkingSpeedLimit       = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.WalkingSpeedLimitCompressionInfo, ref bufferReadValid);
            this.CrouchWalkingSpeedLimit = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.WalkingSpeedLimitCompressionInfo, ref bufferReadValid);
            this.StepSize                = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.StepSizeCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Weapon    = ModuleNetworkData.ReadWeaponReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
            this.Agent     = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.SlotIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, 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);
        }
Exemple #20
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);
        }
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent            = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid, true);
            this.EquipmentIndex   = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid);
            this.WeaponSpawnFlags = (Mission.WeaponSpawnFlags)GameNetworkMessage.ReadIntFromPacket(CompressionMission.SpawnedItemWeaponSpawnFlagCompressionInfo, ref bufferReadValid);
            if (this.WeaponSpawnFlags.HasAnyFlag <Mission.WeaponSpawnFlags>(Mission.WeaponSpawnFlags.WithPhysics))
            {
                this.Velocity        = GameNetworkMessage.ReadVec3FromPacket(CompressionMission.SpawnedItemVelocityCompressionInfo, ref bufferReadValid);
                this.AngularVelocity = GameNetworkMessage.ReadVec3FromPacket(CompressionMission.SpawnedItemAngularVelocityCompressionInfo, ref bufferReadValid);
            }
            else
            {
                this.Velocity        = Vec3.Zero;
                this.AngularVelocity = Vec3.Zero;
            }
            this.ForcedIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }