From a6b8eb7bcac000dcf6ef94932743346b3de1bb05 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 24 Sep 2015 19:11:17 +0100 Subject: some cleanup on terrain encoder --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 5ca96f2..6684611 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -1355,7 +1355,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { try { - List packets = OpenSimTerrainCompressor.CreateTerrainPatchsPacket(terrData, px, py); + byte landPacketType; + if (terrData.SizeX > Constants.RegionSize || terrData.SizeY > Constants.RegionSize) + landPacketType = (byte)TerrainPatch.LayerType.LandExtended; + else + landPacketType = (byte)TerrainPatch.LayerType.Land; + + List packets = OpenSimTerrainCompressor.CreateLayerDataPackets(terrData, px, py, landPacketType); foreach(LayerDataPacket pkt in packets) OutPacket(pkt, ThrottleOutPacketType.Land); } @@ -1404,7 +1410,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) layerType = (byte)TerrainPatch.LayerType.WindExtended; - // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); layerpack.Header.Zerocoded = true; @@ -1434,8 +1439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) layerType = (byte)TerrainPatch.LayerType.CloudExtended; - // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); - LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, + LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); layerpack.Header.Zerocoded = true; OutPacket(layerpack, ThrottleOutPacketType.Cloud); -- cgit v1.1