diff options
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 960e0a2..7e85396 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -348,6 +348,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
348 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; | 348 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; |
349 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; | 349 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; |
350 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; | 350 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; |
351 | |||
352 | /// <value> | ||
353 | /// List used in construction of data blocks for an object update packet. This is to stop us having to | ||
354 | /// continually recreate it. | ||
355 | /// </value> | ||
356 | protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder; | ||
357 | |||
358 | /// <value> | ||
359 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the | ||
360 | /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an | ||
361 | /// ownerless phantom. | ||
362 | /// | ||
363 | /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock | ||
364 | /// | ||
365 | /// </value> | ||
366 | protected HashSet<uint> m_killRecord; | ||
367 | |||
351 | private int m_moneyBalance; | 368 | private int m_moneyBalance; |
352 | private int m_animationSequenceNumber = 1; | 369 | private int m_animationSequenceNumber = 1; |
353 | private bool m_SendLogoutPacketWhenClosing = true; | 370 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -437,6 +454,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
437 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 454 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
438 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 455 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
439 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); | 456 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); |
457 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | ||
458 | m_killRecord = new HashSet<uint>(); | ||
440 | 459 | ||
441 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 460 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
442 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | 461 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); |
@@ -1473,7 +1492,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1473 | kill.ObjectData[0].ID = localID; | 1492 | kill.ObjectData[0].ID = localID; |
1474 | kill.Header.Reliable = true; | 1493 | kill.Header.Reliable = true; |
1475 | kill.Header.Zerocoded = true; | 1494 | kill.Header.Zerocoded = true; |
1476 | OutPacket(kill, ThrottleOutPacketType.State); | 1495 | |
1496 | lock (m_primFullUpdates.SyncRoot) | ||
1497 | { | ||
1498 | m_killRecord.Add(localID); | ||
1499 | OutPacket(kill, ThrottleOutPacketType.State); | ||
1500 | } | ||
1477 | } | 1501 | } |
1478 | 1502 | ||
1479 | /// <summary> | 1503 | /// <summary> |
@@ -3513,21 +3537,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3513 | if (count == 0) | 3537 | if (count == 0) |
3514 | return; | 3538 | return; |
3515 | 3539 | ||
3516 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; | 3540 | m_fullUpdateDataBlocksBuilder.Clear(); |
3541 | |||
3517 | for (int i = 0; i < count; i++) | 3542 | for (int i = 0; i < count; i++) |
3518 | { | 3543 | { |
3519 | outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); | 3544 | ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue(); |
3520 | 3545 | ||
3546 | if (!m_killRecord.Contains(block.ID)) | ||
3547 | { | ||
3548 | m_fullUpdateDataBlocksBuilder.Add(block); | ||
3549 | |||
3521 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); | 3550 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); |
3522 | // if (text.IndexOf("\n") >= 0) | 3551 | // if (text.IndexOf("\n") >= 0) |
3523 | // text = text.Remove(text.IndexOf("\n")); | 3552 | // text = text.Remove(text.IndexOf("\n")); |
3524 | // m_log.DebugFormat( | 3553 | // m_log.DebugFormat( |
3525 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", | 3554 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", |
3526 | // outPacket.ObjectData[i].ID, text, Name); | 3555 | // outPacket.ObjectData[i].ID, text, Name); |
3556 | } | ||
3557 | // else | ||
3558 | // { | ||
3559 | // m_log.WarnFormat( | ||
3560 | // "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name); | ||
3561 | // } | ||
3527 | } | 3562 | } |
3528 | } | ||
3529 | 3563 | ||
3530 | OutPacket(outPacket, ThrottleOutPacketType.State); | 3564 | outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray(); |
3565 | |||
3566 | OutPacket(outPacket, ThrottleOutPacketType.State); | ||
3567 | } | ||
3531 | } | 3568 | } |
3532 | 3569 | ||
3533 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 3570 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) |