diff options
author | UbitUmarov | 2015-09-24 19:11:17 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-24 19:11:17 +0100 |
commit | a6b8eb7bcac000dcf6ef94932743346b3de1bb05 (patch) | |
tree | 92950b1153d6e19742e88f9262fa57ff55981197 /OpenSim/Region/ClientStack/Linden | |
parent | save a few more bits per flat patch (diff) | |
download | opensim-SC-a6b8eb7bcac000dcf6ef94932743346b3de1bb05.zip opensim-SC-a6b8eb7bcac000dcf6ef94932743346b3de1bb05.tar.gz opensim-SC-a6b8eb7bcac000dcf6ef94932743346b3de1bb05.tar.bz2 opensim-SC-a6b8eb7bcac000dcf6ef94932743346b3de1bb05.tar.xz |
some cleanup on terrain encoder
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 |
1 files changed, 8 insertions, 4 deletions
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 | |||
1355 | { | 1355 | { |
1356 | try | 1356 | try |
1357 | { | 1357 | { |
1358 | List<LayerDataPacket> packets = OpenSimTerrainCompressor.CreateTerrainPatchsPacket(terrData, px, py); | 1358 | byte landPacketType; |
1359 | if (terrData.SizeX > Constants.RegionSize || terrData.SizeY > Constants.RegionSize) | ||
1360 | landPacketType = (byte)TerrainPatch.LayerType.LandExtended; | ||
1361 | else | ||
1362 | landPacketType = (byte)TerrainPatch.LayerType.Land; | ||
1363 | |||
1364 | List<LayerDataPacket> packets = OpenSimTerrainCompressor.CreateLayerDataPackets(terrData, px, py, landPacketType); | ||
1359 | foreach(LayerDataPacket pkt in packets) | 1365 | foreach(LayerDataPacket pkt in packets) |
1360 | OutPacket(pkt, ThrottleOutPacketType.Land); | 1366 | OutPacket(pkt, ThrottleOutPacketType.Land); |
1361 | } | 1367 | } |
@@ -1404,7 +1410,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1404 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) | 1410 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) |
1405 | layerType = (byte)TerrainPatch.LayerType.WindExtended; | 1411 | layerType = (byte)TerrainPatch.LayerType.WindExtended; |
1406 | 1412 | ||
1407 | // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); | ||
1408 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, | 1413 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, |
1409 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); | 1414 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); |
1410 | layerpack.Header.Zerocoded = true; | 1415 | layerpack.Header.Zerocoded = true; |
@@ -1434,8 +1439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1434 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) | 1439 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) |
1435 | layerType = (byte)TerrainPatch.LayerType.CloudExtended; | 1440 | layerType = (byte)TerrainPatch.LayerType.CloudExtended; |
1436 | 1441 | ||
1437 | // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); | 1442 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, |
1438 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, | ||
1439 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); | 1443 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); |
1440 | layerpack.Header.Zerocoded = true; | 1444 | layerpack.Header.Zerocoded = true; |
1441 | OutPacket(layerpack, ThrottleOutPacketType.Cloud); | 1445 | OutPacket(layerpack, ThrottleOutPacketType.Cloud); |