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.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); }
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); }
protected override bool OnRead() { bool bufferReadValid = true; this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.BotAgent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid); this.Health = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentHealthCompressionInfo, ref bufferReadValid); this.MountHealth = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentHealthCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Agent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid); this.WeaponEquipmentIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemSlotCompressionInfo, ref bufferReadValid); this.AmmoEquipmentIndex = (EquipmentIndex)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WieldSlotCompressionInfo, ref bufferReadValid); this.Ammo = (short)GameNetworkMessage.ReadIntFromPacket(CompressionMission.ItemDataCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.PerkListIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.PerkListIndexCompressionInfo, ref bufferReadValid); this.PerkIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.PerkIndexCompressionInfo, ref bufferReadValid); this.SelectedTroopIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.SelectedTroopIndexCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.CurrentState = (MissionLobbyComponent.MultiplayerGameState)GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.MissionCurrentStateCompressionInfo, ref bufferReadValid); if (this.CurrentState != MissionLobbyComponent.MultiplayerGameState.WaitingFirstPlayers) { this.StateStartTimeInSeconds = GameNetworkMessage.ReadFloatFromPacket(CompressionMatchmaker.MissionTimeCompressionInfo, ref bufferReadValid); } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Side = (BattleSideEnum)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid); this.KillCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.AssistCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.DeathCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.AliveBotCount = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
public virtual bool ReadFromNetwork() { bool bufferReadValid = true; this.GameEntity.SetVisibilityExcludeParents(GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)); if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { MatrixFrame frame = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid); this.GameEntity.SetFrame(ref frame); if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { this._firstFrame = this.GameEntity.GetFrame(); this._lastSynchedFrame = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid); this.SetSynchState(SynchedMissionObject.SynchState.SynchronizeFrameOverTime); this._duration = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.FlagCapturePointDurationCompressionInfo, ref bufferReadValid); this._timer = 0.0f; if (this._duration.ApproximatelyEqualsTo(0.0f)) { this._duration = 0.1f; } } } if ((NativeObject)this.GameEntity.Skeleton != (NativeObject)null && GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { int animationIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.AnimationIndexCompressionInfo, ref bufferReadValid); float animationSpeedMultiplier = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.AnimationSpeedCompressionInfo, ref bufferReadValid); float parameter = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid); this.GameEntity.Skeleton.SetAnimationAtChannel(animationIndex, 0, animationSpeedMultiplier, 0.0f); this.GameEntity.Skeleton.SetAnimationParameterAtChannel(0, parameter); if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { this.GameEntity.Skeleton.TickAnimationsAndForceUpdate(1f / 1000f, this.GameEntity.GetGlobalFrame(), true); this.GameEntity.PauseSkeletonAnimation(); } else { this.GameEntity.ResumeSkeletonAnimation(); } } if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { uint color1 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); uint color2 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); if (bufferReadValid) { this.GameEntity.SetColor(color1, color2, "use_team_color"); } } if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { this.SetDisabledAndMakeInvisible(); } return(bufferReadValid); }
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); }
public static MissionWeapon ReadMissileWeaponReferenceFromPacket( MBObjectManager objectManager, ref bool bufferReadValid) { MBObjectBase mbObjectBase = GameNetworkMessage.ReadObjectReferenceFromPacket(objectManager, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid); short num = (short)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponUsageIndexCompressionInfo, ref bufferReadValid); return(new MissionWeapon(mbObjectBase as ItemObject, (ItemModifier)null, (Banner)null, (short)1) { CurrentUsageIndex = (int)num }); }
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.Progress = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.FlagClassicProgressCompressionInfo, ref bufferReadValid); this.Direction = (CaptureTheFlagFlagDirection)GameNetworkMessage.ReadIntFromPacket(CompressionMission.FlagDirectionEnumCompressionInfo, ref bufferReadValid); if (bufferReadValid && this.Direction != CaptureTheFlagFlagDirection.None && this.Direction != CaptureTheFlagFlagDirection.Static) { this.Speed = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.FlagSpeedCompressionInfo, ref bufferReadValid); } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.VictimPeer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.AttackerPeer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.KillCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.AssistCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.DeathCount = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid); this.Score = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.ScoreCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.AttackerMorale = GameNetworkMessage.ReadIntFromPacket(CompressionMission.SiegeMoraleCompressionInfo, ref bufferReadValid); this.DefenderMorale = GameNetworkMessage.ReadIntFromPacket(CompressionMission.SiegeMoraleCompressionInfo, ref bufferReadValid); this.CapturePointRemainingMoraleGains = new int[7]; for (int index = 0; index < this.CapturePointRemainingMoraleGains.Length; ++index) { this.CapturePointRemainingMoraleGains[index] = GameNetworkMessage.ReadIntFromPacket(CompressionMission.SiegeMoralePerFlagCompressionInfo, ref bufferReadValid); } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.GoldChangeEventList = new List <KeyValuePair <ushort, int> >(); int num = GameNetworkMessage.ReadIntFromPacket(CompressionMission.TdmGoldGainTypeCompressionInfo, ref bufferReadValid) + 1; for (int index = 0; index < num; ++index) { this.GoldChangeEventList.Add(new KeyValuePair <ushort, int>((ushort)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TdmGoldGainTypeCompressionInfo, ref bufferReadValid), GameNetworkMessage.ReadIntFromPacket(CompressionMission.TdmGoldChangeCompressionInfo, ref bufferReadValid))); } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Team = GameNetworkMessage.ReadMBTeamReferenceFromPacket(CompressionMission.TeamCompressionInfo, ref bufferReadValid); this.Side = (BattleSideEnum)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid); this.Color = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); this.Color2 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.IsPlayerGeneral = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); this.IsPlayerSergeant = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); return(bufferReadValid); }
public override bool ReadFromNetwork() { bool bufferReadValid = base.ReadFromNetwork(); int num = GameNetworkMessage.ReadIntFromPacket(CompressionMission.RangedSiegeWeaponAmmoCompressionInfo, ref bufferReadValid); if (bufferReadValid) { this.AmmoCount = num; this.CheckAmmo(); this.UpdateAmmoMesh(); } return(bufferReadValid); }
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.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.VotedType = (CultureVoteTypes)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid); int index = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.CultureIndexCompressionInfo, ref bufferReadValid); if (bufferReadValid) { this.VotedCulture = MBObjectManager.Instance.GetObjectTypeList <BasicCultureObject>()[index]; } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.VotedType = (CultureVoteTypes)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid); int index = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.CultureIndexCompressionInfo, ref bufferReadValid); if (bufferReadValid) { MBReadOnlyList <BasicCultureObject> objectTypeList = MBObjectManager.Instance.GetObjectTypeList <BasicCultureObject>(); this.VotedCulture = index < 0 ? (BasicCultureObject)null : objectTypeList[index]; } 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); }
protected override bool OnRead() { bool bufferReadValid = true; this.ParameterOne = this.ParameterTwo = -1; this.Message = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MultiplayerNotificationCompressionInfo, ref bufferReadValid); if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { this.ParameterOne = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MultiplayerNotificationParameterCompressionInfo, ref bufferReadValid); if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { this.ParameterTwo = GameNetworkMessage.ReadIntFromPacket(CompressionMission.MultiplayerNotificationParameterCompressionInfo, ref bufferReadValid); } } return(bufferReadValid); }
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); }
protected override bool OnRead() { bool bufferReadValid = true; this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); ulong part1 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part2 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part3 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part4 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); if (bufferReadValid) { this.ProvidedId = new PlayerId(part1, part2, part3, part4); } this.BodyProperties = GameNetworkMessage.ReadBodyPropertiesFromPacket(ref bufferReadValid); this.ChosenBadgeIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PlayerChosenBadgeCompressionInfo, ref bufferReadValid); this.ForcedAvatarIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.ForcedAvatarIndexCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
public static MissionWeapon ReadWeaponReferenceFromPacket( MBObjectManager objectManager, ref bool bufferReadValid) { if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { return(MissionWeapon.Invalid); } MBObjectBase mbObjectBase1 = GameNetworkMessage.ReadObjectReferenceFromPacket(objectManager, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid); int num1 = GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.ItemDataValueCompressionInfo, ref bufferReadValid); int num2 = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponReloadPhaseCompressionInfo, ref bufferReadValid); short num3 = (short)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponUsageIndexCompressionInfo, ref bufferReadValid); int num4 = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? 1 : 0; Banner banner = (Banner)null; if (num4 != 0) { string bannerKey = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); if (bufferReadValid) { banner = new Banner(bannerKey); } } ItemObject primaryItem1 = mbObjectBase1 as ItemObject; bool flag = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); MissionWeapon missionWeapon; if (bufferReadValid & flag) { MBObjectBase mbObjectBase2 = GameNetworkMessage.ReadObjectReferenceFromPacket(objectManager, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid); int num5 = GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.ItemDataValueCompressionInfo, ref bufferReadValid); ItemObject primaryItem2 = mbObjectBase2 as ItemObject; missionWeapon = new MissionWeapon(primaryItem1, (ItemModifier)null, banner, (short)num1, (short)num2, new MissionWeapon?(new MissionWeapon(primaryItem2, (ItemModifier)null, banner, (short)num5))); } else { missionWeapon = new MissionWeapon(primaryItem1, (ItemModifier)null, banner, (short)num1, (short)num2, new MissionWeapon?()); } missionWeapon.CurrentUsageIndex = (int)num3; return(missionWeapon); }
protected override bool OnRead() { bool bufferReadValid = true; this.ObjectId = GameNetworkMessage.ReadMissionObjectIdFromPacket(ref bufferReadValid); this.Prefab = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.Frame = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid); int capacity = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.EntityChildCountCompressionInfo, ref bufferReadValid); if (bufferReadValid) { this.ChildObjectIds = new List <MissionObjectId>(capacity); for (int index = 0; index < capacity; ++index) { if (bufferReadValid) { this.ChildObjectIds.Add(GameNetworkMessage.ReadMissionObjectIdFromPacket(ref bufferReadValid)); } } } return(bufferReadValid); }