aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2015-09-07 11:23:00 +0100
committerUbitUmarov2015-09-07 11:23:00 +0100
commit7276a89ddd818c4bd0611345e8af1813f2843184 (patch)
tree66bc80ba3ad0cddb27829c5f10590e1a8ad23a1b /OpenSim/Region/ClientStack
parentallocate llRAW LookupHeightTable on demand and release it, saving a few 512KB... (diff)
downloadopensim-SC-7276a89ddd818c4bd0611345e8af1813f2843184.zip
opensim-SC-7276a89ddd818c4bd0611345e8af1813f2843184.tar.gz
opensim-SC-7276a89ddd818c4bd0611345e8af1813f2843184.tar.bz2
opensim-SC-7276a89ddd818c4bd0611345e8af1813f2843184.tar.xz
recover opensim m_sendTerrainUpdatesByViewDistance. if false do as opensim (slower since it depended on sending terrain as TASK). if true send by view range and also all terrain at arrival
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs47
1 files changed, 39 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 6df55a6..7c5aee7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1242,14 +1242,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1242 try 1242 try
1243 { 1243 {
1244 // Send LayerData in typerwriter pattern 1244 // Send LayerData in typerwriter pattern
1245 //for (int y = 0; y < 16; y++)
1246 //{
1247 // for (int x = 0; x < 16; x++)
1248 // {
1249 // SendLayerData(x, y, map);
1250 // }
1251 //}
1245 1252
1246 for (int y = 0; y < 16; y++) 1253 // Send LayerData in a spiral pattern. Fun!
1247 { 1254 SendLayerTopRight(map, 0, 0, map.SizeX / Constants.TerrainPatchSize - 1, map.SizeY / Constants.TerrainPatchSize - 1);
1248 for (int x = 0; x < 16; x++)
1249 {
1250 SendLayerData(x, y, map);
1251 }
1252 }
1253 } 1255 }
1254 catch (Exception e) 1256 catch (Exception e)
1255 { 1257 {
@@ -1257,6 +1259,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1257 } 1259 }
1258 } 1260 }
1259 1261
1262 private void SendLayerTopRight(TerrainData map, int x1, int y1, int x2, int y2)
1263 {
1264 // Row
1265 for (int i = x1; i <= x2; i++)
1266 SendLayerData(i, y1, map);
1267
1268 // Column
1269 for (int j = y1 + 1; j <= y2; j++)
1270 SendLayerData(x2, j, map);
1271
1272 if (x2 - x1 > 0 && y2 - y1 > 0)
1273 SendLayerBottomLeft(map, x1, y1 + 1, x2 - 1, y2);
1274 }
1275
1276 void SendLayerBottomLeft(TerrainData map, int x1, int y1, int x2, int y2)
1277 {
1278 // Row in reverse
1279 for (int i = x2; i >= x1; i--)
1280 SendLayerData(i, y2, map);
1281
1282 // Column in reverse
1283 for (int j = y2 - 1; j >= y1; j--)
1284 SendLayerData(x1, j, map);
1285
1286 if (x2 - x1 > 0 && y2 - y1 > 0)
1287 SendLayerTopRight(map, x1 + 1, y1, x2, y2 - 1);
1288 }
1289
1290
1260 // Legacy form of invocation that passes around a bare data array. 1291 // Legacy form of invocation that passes around a bare data array.
1261 // Just ignore what was passed and use the real terrain info that is part of the scene. 1292 // Just ignore what was passed and use the real terrain info that is part of the scene.
1262 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI, 1293 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
@@ -1359,7 +1390,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1359 1390
1360 private void SendTheLayerPacket(LayerDataPacket layerpack) 1391 private void SendTheLayerPacket(LayerDataPacket layerpack)
1361 { 1392 {
1362 OutPacket(layerpack, ThrottleOutPacketType.Land); 1393 OutPacket(layerpack, ThrottleOutPacketType.Land);
1363 } 1394 }
1364 1395
1365 /// <summary> 1396 /// <summary>