diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 46836b1..6c81035 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -1315,6 +1315,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1315 | { | 1315 | { |
1316 | try | 1316 | try |
1317 | { | 1317 | { |
1318 | if (px.Length != py.Length || | ||
1319 | terrData.SizeX != (int)Scene.RegionInfo.RegionSizeX || | ||
1320 | terrData.SizeY != (int)Scene.RegionInfo.RegionSizeY) | ||
1321 | { | ||
1322 | if (px.Length != py.Length) | ||
1323 | m_log.Debug("px py"); | ||
1324 | if (terrData.SizeX != Scene.RegionInfo.RegionSizeX) | ||
1325 | m_log.Debug("sx"); | ||
1326 | if (terrData.SizeY != Scene.RegionInfo.RegionSizeY) | ||
1327 | m_log.Debug("sx"); | ||
1328 | } | ||
1329 | |||
1318 | /* test code using the terrain compressor in libOpenMetaverse | 1330 | /* test code using the terrain compressor in libOpenMetaverse |
1319 | int[] patchInd = new int[1]; | 1331 | int[] patchInd = new int[1]; |
1320 | patchInd[0] = px + (py * Constants.TerrainPatchSize); | 1332 | patchInd[0] = px + (py * Constants.TerrainPatchSize); |
@@ -1346,34 +1358,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1346 | } | 1358 | } |
1347 | } | 1359 | } |
1348 | 1360 | ||
1349 | // When a user edits the terrain, so much data is sent, the data queues up fast and presents a | 1361 | private void SendTheLayerPacket(LayerDataPacket layerpack) |
1350 | // sub optimal editing experience. To alleviate this issue, when the user edits the terrain, we | ||
1351 | // start skipping the queues until they're done editing the terrain. We also make them | ||
1352 | // unreliable because it's extremely likely that multiple packets will be sent for a terrain patch | ||
1353 | // area invalidating previous packets for that area. | ||
1354 | |||
1355 | // It's possible for an editing user to flood themselves with edited packets but the majority | ||
1356 | // of use cases are such that only a tiny percentage of users will be editing the terrain. | ||
1357 | // Other, non-editing users will see the edits much slower. | ||
1358 | |||
1359 | // One last note on this topic, by the time users are going to be editing the terrain, it's | ||
1360 | // extremely likely that the sim will have rezzed already and therefore this is not likely going | ||
1361 | // to cause any additional issues with lost packets, objects or terrain patches. | ||
1362 | |||
1363 | // m_justEditedTerrain is volatile, so test once and duplicate two affected statements so we | ||
1364 | // only have one cache miss. | ||
1365 | private void SendTheLayerPacket(LayerDataPacket layerpack) | ||
1366 | { | 1362 | { |
1367 | if (m_justEditedTerrain) | ||
1368 | { | ||
1369 | layerpack.Header.Reliable = false; | ||
1370 | OutPacket(layerpack, ThrottleOutPacketType.Unknown ); | ||
1371 | } | ||
1372 | else | ||
1373 | { | ||
1374 | layerpack.Header.Reliable = true; | ||
1375 | OutPacket(layerpack, ThrottleOutPacketType.Land); | 1363 | OutPacket(layerpack, ThrottleOutPacketType.Land); |
1376 | } | ||
1377 | } | 1364 | } |
1378 | 1365 | ||
1379 | /// <summary> | 1366 | /// <summary> |