aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorHomer Horwitz2009-04-04 15:43:02 +0000
committerHomer Horwitz2009-04-04 15:43:02 +0000
commit8136cf4075216d09738b8707258581e6db755759 (patch)
tree0d1a595c9301801750180624aeb04e839cf8f583 /OpenSim/Region/ClientStack/LindenUDP
parentDST setting wasn't transferred to client, leading to wrong time display. (diff)
downloadopensim-SC_OLD-8136cf4075216d09738b8707258581e6db755759.zip
opensim-SC_OLD-8136cf4075216d09738b8707258581e6db755759.tar.gz
opensim-SC_OLD-8136cf4075216d09738b8707258581e6db755759.tar.bz2
opensim-SC_OLD-8136cf4075216d09738b8707258581e6db755759.tar.xz
Thanks jonc, for a patch that adds rendering of classic clouds.
First part of Mantis #964, the necessary clouds image will follow separately.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs39
1 files changed, 35 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5c86964..9b2f0ef 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1360,7 +1360,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1360 } 1360 }
1361 1361
1362 /// <summary> 1362 /// <summary>
1363 /// Send the region heightmap to the client 1363 /// Send the wind matrix to the client
1364 /// </summary> 1364 /// </summary>
1365 /// <param name="windSpeeds">16x16 array of wind speeds</param> 1365 /// <param name="windSpeeds">16x16 array of wind speeds</param>
1366 public virtual void SendWindData(Vector2[] windSpeeds) 1366 public virtual void SendWindData(Vector2[] windSpeeds)
@@ -1369,13 +1369,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1369 } 1369 }
1370 1370
1371 /// <summary> 1371 /// <summary>
1372 /// Send terrain layer information to the client. 1372 /// Send the cloud matrix to the client
1373 /// </summary>
1374 /// <param name="windSpeeds">16x16 array of cloud densities</param>
1375 public virtual void SendCloudData(float[] cloudDensity)
1376 {
1377 ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity);
1378 }
1379
1380 /// <summary>
1381 /// Send wind layer information to the client.
1373 /// </summary> 1382 /// </summary>
1374 /// <param name="o"></param> 1383 /// <param name="o"></param>
1375 private void DoSendWindData(object o) 1384 private void DoSendWindData(object o)
1376 { 1385 {
1377 Vector2[] windSpeeds = (Vector2[])o; 1386 Vector2[] windSpeeds = (Vector2[])o;
1378
1379 TerrainPatch[] patches = new TerrainPatch[2]; 1387 TerrainPatch[] patches = new TerrainPatch[2];
1380 patches[0] = new TerrainPatch(); 1388 patches[0] = new TerrainPatch();
1381 patches[0].Data = new float[16 * 16]; 1389 patches[0].Data = new float[16 * 16];
@@ -1393,11 +1401,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1393 1401
1394 LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Wind); 1402 LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Wind);
1395 layerpack.Header.Zerocoded = true; 1403 layerpack.Header.Zerocoded = true;
1396
1397 OutPacket(layerpack, ThrottleOutPacketType.Wind); 1404 OutPacket(layerpack, ThrottleOutPacketType.Wind);
1398 } 1405 }
1399 1406
1400 /// <summary> 1407 /// <summary>
1408 /// Send cloud layer information to the client.
1409 /// </summary>
1410 /// <param name="o"></param>
1411 private void DoSendCloudData(object o)
1412 {
1413 float[] cloudCover = (float[])o;
1414 TerrainPatch[] patches = new TerrainPatch[1];
1415 patches[0] = new TerrainPatch();
1416 patches[0].Data = new float[16 * 16];
1417
1418 for (int y = 0; y < 16; y++)
1419 {
1420 for (int x = 0; x < 16; x++)
1421 {
1422 patches[0].Data[y * 16 + x] = cloudCover[y * 16 + x];
1423 }
1424 }
1425
1426 LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, TerrainPatch.LayerType.Cloud);
1427 layerpack.Header.Zerocoded = true;
1428 OutPacket(layerpack, ThrottleOutPacketType.Cloud);
1429 }
1430
1431 /// <summary>
1401 /// Tell the client that the given neighbour region is ready to receive a child agent. 1432 /// Tell the client that the given neighbour region is ready to receive a child agent.
1402 /// </summary> 1433 /// </summary>
1403 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint) 1434 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint)