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.WarmupState = (MultiplayerWarmupComponent.WarmupStates)GameNetworkMessage.ReadIntFromPacket(CompressionMission.MissionRoundStateCompressionInfo, ref bufferReadValid); this.StateStartTimeInSeconds = GameNetworkMessage.ReadFloatFromPacket(CompressionMatchmaker.MissionTimeCompressionInfo, ref bufferReadValid); 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.UsableMachine = GameNetworkMessage.ReadMissionObjectReferenceFromPacket(ref bufferReadValid) as UsableMachine; this.Distance = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.PositionCompressionInfo, 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.IntermissionState = (MultiplayerIntermissionState)GameNetworkMessage.ReadIntFromPacket(CompressionBasic.IntermissionStateCompressionInfo, ref bufferReadValid); this.IntermissionTimer = GameNetworkMessage.ReadFloatFromPacket(CompressionBasic.IntermissionTimerCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.RoundState = (MultiplayerRoundState)GameNetworkMessage.ReadIntFromPacket(CompressionMission.MissionRoundStateCompressionInfo, ref bufferReadValid); this.StateStartTimeInSeconds = GameNetworkMessage.ReadFloatFromPacket(CompressionMatchmaker.MissionTimeCompressionInfo, ref bufferReadValid); this.RemainingTimeOnPreviousState = GameNetworkMessage.ReadIntFromPacket(CompressionMission.RoundTimeCompressionInfo, 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); }
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.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.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); }
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.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.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.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); }
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); } this.Duration = GameNetworkMessage.ReadFloatFromPacket(CompressionMission.FlagCapturePointDurationCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
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); }