diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0aa670a..2163c12 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3678,56 +3678,56 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3678 | 3678 | ||
3679 | #endregion Block Construction | 3679 | #endregion Block Construction |
3680 | } | 3680 | } |
3681 | } | ||
3682 | |||
3683 | #region Packet Sending | ||
3684 | |||
3685 | const float TIME_DILATION = 1.0f; | ||
3686 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | ||
3687 | |||
3688 | if (objectUpdateBlocks.IsValueCreated) | ||
3689 | { | ||
3690 | List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; | ||
3691 | |||
3692 | ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | ||
3693 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3694 | packet.RegionData.TimeDilation = timeDilation; | ||
3695 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3696 | |||
3697 | for (int i = 0; i < blocks.Count; i++) | ||
3698 | packet.ObjectData[i] = blocks[i]; | ||
3699 | |||
3700 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3701 | } | ||
3702 | |||
3703 | if (compressedUpdateBlocks.IsValueCreated) | ||
3704 | { | ||
3705 | List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value; | ||
3706 | |||
3707 | ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); | ||
3708 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3709 | packet.RegionData.TimeDilation = timeDilation; | ||
3710 | packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count]; | ||
3711 | |||
3712 | for (int i = 0; i < blocks.Count; i++) | ||
3713 | packet.ObjectData[i] = blocks[i]; | ||
3714 | |||
3715 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3716 | } | ||
3717 | |||
3718 | if (terseUpdateBlocks.IsValueCreated) | ||
3719 | { | ||
3720 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; | ||
3721 | |||
3722 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | ||
3723 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3724 | packet.RegionData.TimeDilation = timeDilation; | ||
3725 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3726 | |||
3727 | for (int i = 0; i < blocks.Count; i++) | ||
3728 | packet.ObjectData[i] = blocks[i]; | ||
3729 | 3681 | ||
3730 | OutPacket(packet, ThrottleOutPacketType.Task, true); | 3682 | #region Packet Sending |
3683 | |||
3684 | const float TIME_DILATION = 1.0f; | ||
3685 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | ||
3686 | |||
3687 | if (objectUpdateBlocks.IsValueCreated) | ||
3688 | { | ||
3689 | List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; | ||
3690 | |||
3691 | ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | ||
3692 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3693 | packet.RegionData.TimeDilation = timeDilation; | ||
3694 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3695 | |||
3696 | for (int i = 0; i < blocks.Count; i++) | ||
3697 | packet.ObjectData[i] = blocks[i]; | ||
3698 | |||
3699 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3700 | } | ||
3701 | |||
3702 | if (compressedUpdateBlocks.IsValueCreated) | ||
3703 | { | ||
3704 | List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value; | ||
3705 | |||
3706 | ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); | ||
3707 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3708 | packet.RegionData.TimeDilation = timeDilation; | ||
3709 | packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count]; | ||
3710 | |||
3711 | for (int i = 0; i < blocks.Count; i++) | ||
3712 | packet.ObjectData[i] = blocks[i]; | ||
3713 | |||
3714 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3715 | } | ||
3716 | |||
3717 | if (terseUpdateBlocks.IsValueCreated) | ||
3718 | { | ||
3719 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; | ||
3720 | |||
3721 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | ||
3722 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3723 | packet.RegionData.TimeDilation = timeDilation; | ||
3724 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3725 | |||
3726 | for (int i = 0; i < blocks.Count; i++) | ||
3727 | packet.ObjectData[i] = blocks[i]; | ||
3728 | |||
3729 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3730 | } | ||
3731 | } | 3731 | } |
3732 | 3732 | ||
3733 | #endregion Packet Sending | 3733 | #endregion Packet Sending |