mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
remove legacy Clouds module no longer supported by most viewers
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user