remove legacy Clouds module no longer supported by most viewers

This commit is contained in:
UbitUmarov
2022-04-02 16:20:15 +01:00
parent 4ebc639669
commit 44e0d238ec
7 changed files with 0 additions and 345 deletions

View File

@@ -1769,65 +1769,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(pkt, ThrottleOutPacketType.Wind);
}
// cloud caching
private static Dictionary<ulong,int> lastCloudVersion = new Dictionary<ulong,int>();
private static Dictionary<ulong,List<LayerDataPacket>> lastCloudPackets =
new Dictionary<ulong,List<LayerDataPacket>>();
/// <summary>
/// Send the cloud matrix to the client
/// </summary>
/// <param name="windSpeeds">16x16 array of cloud densities</param>
public virtual void SendCloudData(int version, float[] cloudDensity)
{
ulong handle = this.Scene.RegionInfo.RegionHandle;
bool isNewData;
lock(lastWindPackets)
{
if(!lastCloudVersion.ContainsKey(handle) ||
!lastCloudPackets.ContainsKey(handle))
{
lastCloudVersion[handle] = 0;
lastCloudPackets[handle] = new List<LayerDataPacket>();
isNewData = true;
}
else
isNewData = lastCloudVersion[handle] != version;
}
if(isNewData)
{
TerrainPatch[] patches = new TerrainPatch[1];
patches[0] = new TerrainPatch();
patches[0].Data = new float[16 * 16];
for (int y = 0; y < 16; y++)
{
for (int x = 0; x < 16; x++)
{
patches[0].Data[y * 16 + x] = cloudDensity[y * 16 + x];
}
}
// neither we or viewers have extended clouds
byte layerType = (byte)TerrainPatch.LayerType.Cloud;
LayerDataPacket layerpack =
OpenSimTerrainCompressor.CreateLayerDataPacketStandardSize(
patches, layerType);
layerpack.Header.Zerocoded = true;
lock(lastCloudPackets)
{
lastCloudPackets[handle].Clear();
lastCloudPackets[handle].Add(layerpack);
lastCloudVersion[handle] = version;
}
}
lock(lastCloudPackets)
foreach(LayerDataPacket pkt in lastCloudPackets[handle])
OutPacket(pkt, ThrottleOutPacketType.Cloud);
}
/// <summary>
/// Tell the client that the given neighbour region is ready to receive a child agent.
/// </summary>