varregion: Send large region patches for wind and clouds.

0.8.0.3
Robert Adams 2014-02-08 08:35:06 -08:00
parent b83a224147
commit c0cc5e0fa4
2 changed files with 13 additions and 5 deletions

View File

@ -1323,7 +1323,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
} }
LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Wind); byte layerType = (byte)TerrainPatch.LayerType.Wind;
if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize)
layerType = (byte)TerrainPatch.LayerType.WindExtended;
LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType,
(int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
layerpack.Header.Zerocoded = true; layerpack.Header.Zerocoded = true;
OutPacket(layerpack, ThrottleOutPacketType.Wind); OutPacket(layerpack, ThrottleOutPacketType.Wind);
} }
@ -1347,7 +1352,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
} }
LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Cloud); byte layerType = (byte)TerrainPatch.LayerType.Cloud;
if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize)
layerType = (byte)TerrainPatch.LayerType.CloudExtended;
LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType,
(int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
layerpack.Header.Zerocoded = true; layerpack.Header.Zerocoded = true;
OutPacket(layerpack, ThrottleOutPacketType.Cloud); OutPacket(layerpack, ThrottleOutPacketType.Cloud);
} }

View File

@ -119,9 +119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
byte landPacketType = (byte)TerrainPatch.LayerType.Land; byte landPacketType = (byte)TerrainPatch.LayerType.Land;
if (terrData.SizeX > Constants.RegionSize || terrData.SizeY > Constants.RegionSize) if (terrData.SizeX > Constants.RegionSize || terrData.SizeY > Constants.RegionSize)
{ {
// libOMV does not have a packet type defined for the extended parcel format. landPacketType = (byte)TerrainPatch.LayerType.LandExtended;
// We just happen to know the extended parcel format code is one more than the usual code.
landPacketType++;
} }
return CreateLandPacket(terrData, xPieces, yPieces, landPacketType); return CreateLandPacket(terrData, xPieces, yPieces, landPacketType);