aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs50
1 files changed, 27 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e21bf7c..39bda70 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1235 /// <param name="map">heightmap</param> 1235 /// <param name="map">heightmap</param>
1236 public virtual void SendWindData(float[] map) 1236 public virtual void SendWindData(float[] map)
1237 { 1237 {
1238 ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)map); 1238 //ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)map);
1239 } 1239 }
1240 1240
1241 /// <summary> 1241 /// <summary>
@@ -1244,12 +1244,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1244 /// <param name="o"></param> 1244 /// <param name="o"></param>
1245 private void DoSendWindData(object o) 1245 private void DoSendWindData(object o)
1246 { 1246 {
1247 float[] map = (float[])o; 1247 //float[] map = (float[])o;
1248 1248
1249 try 1249 //try
1250 { 1250 //{
1251 for (int y = 0; y < 16; y++) 1251 //for (int y = 0; y < 16; y++)
1252 { 1252 //{
1253 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception 1253 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception
1254 // see http://opensimulator.org/mantis/view.php?id=1662 1254 // see http://opensimulator.org/mantis/view.php?id=1662
1255 //for (int x = 0; x < 16; x += 4) 1255 //for (int x = 0; x < 16; x += 4)
@@ -1257,17 +1257,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1257 // SendLayerPacket(map, y, x); 1257 // SendLayerPacket(map, y, x);
1258 // Thread.Sleep(150); 1258 // Thread.Sleep(150);
1259 //} 1259 //}
1260 for (int x = 0; x < 16; x++) 1260 // for (int x = 0; x < 16; x++)
1261 { 1261 //{
1262 SendWindData(x, y, map); 1262 //SendWindData(x, y, map);
1263 Thread.Sleep(35); 1263 //Thread.Sleep(35);
1264 } 1264 //}
1265 } 1265 //}
1266 } 1266 //}
1267 catch (Exception e) 1267 //catch (Exception e)
1268 { 1268 //{
1269 m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); 1269 // m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
1270 } 1270 // }
1271 } 1271 }
1272 1272
1273 /// <summary> 1273 /// <summary>
@@ -1294,16 +1294,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1294 /// <param name="px">Patch coordinate (x) 0..15</param> 1294 /// <param name="px">Patch coordinate (x) 0..15</param>
1295 /// <param name="py">Patch coordinate (y) 0..15</param> 1295 /// <param name="py">Patch coordinate (y) 0..15</param>
1296 /// <param name="map">heightmap</param> 1296 /// <param name="map">heightmap</param>
1297 public void SendWindData(int px, int py, float[] map) 1297 public void SendWindData(int p1x, int p1y, int p2x, int p2y, float[] map)
1298 { 1298 {
1299 try 1299 try
1300 { 1300 {
1301 int[] patches = new int[1]; 1301 int[] patches = new int[2];
1302 int patchx, patchy; 1302 int patch1x, patch1y, patch2x, patch2y;
1303 patchx = px; 1303 patch1x = p1x;
1304 patchy = py; 1304 patch1y = p1y;
1305 patch2x = p2x;
1306 patch2y = p2y;
1305 1307
1306 patches[0] = patchx + 0 + patchy * 16; 1308
1309 patches[0] = patch1x + 0 + patch1y * 16;
1310 patches[1] = patch2x + 0 + patch2y * 16;
1307 1311
1308 LayerDataPacket layerpack = TerrainCompressor.CreateWindPacket(map, patches); 1312 LayerDataPacket layerpack = TerrainCompressor.CreateWindPacket(map, patches);
1309 layerpack.Header.Zerocoded = true; 1313 layerpack.Header.Zerocoded = true;