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); }
protected override void OnWrite() { GameNetworkMessage.WriteMissionObjectIdToPacket(this.ObjectId); GameNetworkMessage.WriteStringToPacket(this.Prefab); GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame); GameNetworkMessage.WriteIntToPacket(this.ChildObjectIds.Count, CompressionBasic.EntityChildCountCompressionInfo); foreach (MissionObjectId childObjectId in this.ChildObjectIds) { GameNetworkMessage.WriteMissionObjectIdToPacket(childObjectId); } }
public virtual void WriteToNetwork() { GameNetworkMessage.WriteBoolToPacket(this.GameEntity.GetVisibilityExcludeParents()); GameNetworkMessage.WriteBoolToPacket(this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchTransform)); if (this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchTransform)) { GameNetworkMessage.WriteMatrixFrameToPacket(this.GameEntity.GetFrame()); GameNetworkMessage.WriteBoolToPacket(this._synchState == SynchedMissionObject.SynchState.SynchronizeFrameOverTime); if (this._synchState == SynchedMissionObject.SynchState.SynchronizeFrameOverTime) { GameNetworkMessage.WriteMatrixFrameToPacket(this._lastSynchedFrame); GameNetworkMessage.WriteFloatToPacket(this._duration - this._timer, CompressionMission.FlagCapturePointDurationCompressionInfo); } } if ((NativeObject)this.GameEntity.Skeleton != (NativeObject)null) { string animationAtChannel = this.GameEntity.Skeleton.GetAnimationAtChannel(0); int num = !string.IsNullOrEmpty(animationAtChannel) ? 1 : 0; GameNetworkMessage.WriteBoolToPacket(num != 0 && this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchAnimation)); if (num != 0 && this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SynchAnimation)) { int animationIndexWithName = MBAnimation.GetAnimationIndexWithName(animationAtChannel); double animationSpeedAtChannel = (double)this.GameEntity.Skeleton.GetAnimationSpeedAtChannel(0); GameNetworkMessage.WriteIntToPacket(animationIndexWithName, CompressionBasic.AnimationIndexCompressionInfo); CompressionInfo.Float speedCompressionInfo = CompressionBasic.AnimationSpeedCompressionInfo; GameNetworkMessage.WriteFloatToPacket((float)animationSpeedAtChannel, speedCompressionInfo); GameNetworkMessage.WriteFloatToPacket(this.GameEntity.Skeleton.GetAnimationParameterAtChannel(0), CompressionBasic.UnitVectorCompressionInfo); GameNetworkMessage.WriteBoolToPacket(this.GameEntity.IsSkeletonAnimationPaused()); } } GameNetworkMessage.WriteBoolToPacket(this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SyncColors)); if (this._initialSynchFlags.HasAnyFlag <SynchedMissionObject.SynchFlags>(SynchedMissionObject.SynchFlags.SyncColors)) { GameNetworkMessage.WriteUintToPacket(this.Color, CompressionGeneric.ColorCompressionInfo); GameNetworkMessage.WriteUintToPacket(this.Color2, CompressionGeneric.ColorCompressionInfo); } GameNetworkMessage.WriteBoolToPacket(this.IsDisabled); }
protected override void OnWrite() { GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject); GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame); }
protected override void OnWrite() { GameNetworkMessage.WriteMissionObjectReferenceToPacket(this.MissionObject); GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame); GameNetworkMessage.WriteFloatToPacket(this.Duration, CompressionMission.FlagCapturePointDurationCompressionInfo); }