diff options
author | Melanie | 2010-03-30 21:34:27 +0100 |
---|---|---|
committer | Melanie | 2010-03-30 21:34:27 +0100 |
commit | 5693870fe26fae35a28f2d5103780434f4f40e57 (patch) | |
tree | 0e070fb6f11ab8763ac4f1f9a851a0061101d4d6 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
parent | minor: commented out code removal (diff) | |
download | opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.zip opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.gz opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.bz2 opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8cd47fb..0762ed0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -40,7 +40,6 @@ using OpenMetaverse.Packets; | |||
40 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Framework.Client; | 42 | using OpenSim.Framework.Client; |
43 | |||
44 | using OpenSim.Framework.Statistics; | 43 | using OpenSim.Framework.Statistics; |
45 | using OpenSim.Region.Framework.Interfaces; | 44 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 45 | using OpenSim.Region.Framework.Scenes; |
@@ -353,6 +352,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
353 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; | 352 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; |
354 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; | 353 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; |
355 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; | 354 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; |
355 | |||
356 | /// <value> | ||
357 | /// List used in construction of data blocks for an object update packet. This is to stop us having to | ||
358 | /// continually recreate it. | ||
359 | /// </value> | ||
360 | protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder; | ||
361 | |||
362 | /// <value> | ||
363 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the | ||
364 | /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an | ||
365 | /// ownerless phantom. | ||
366 | /// | ||
367 | /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock | ||
368 | /// | ||
369 | /// </value> | ||
370 | protected HashSet<uint> m_killRecord; | ||
371 | |||
356 | private int m_moneyBalance; | 372 | private int m_moneyBalance; |
357 | private int m_animationSequenceNumber = 1; | 373 | private int m_animationSequenceNumber = 1; |
358 | private bool m_SendLogoutPacketWhenClosing = true; | 374 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -449,6 +465,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
449 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 465 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
450 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 466 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); |
451 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); | 467 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); |
468 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | ||
469 | m_killRecord = new HashSet<uint>(); | ||
452 | 470 | ||
453 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 471 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
454 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | 472 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); |
@@ -1474,7 +1492,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1474 | kill.ObjectData[0].ID = localID; | 1492 | kill.ObjectData[0].ID = localID; |
1475 | kill.Header.Reliable = true; | 1493 | kill.Header.Reliable = true; |
1476 | kill.Header.Zerocoded = true; | 1494 | kill.Header.Zerocoded = true; |
1477 | OutPacket(kill, ThrottleOutPacketType.State); | 1495 | |
1496 | lock (m_primFullUpdates.SyncRoot) | ||
1497 | { | ||
1498 | m_killRecord.Add(localID); | ||
1499 | OutPacket(kill, ThrottleOutPacketType.State); | ||
1500 | } | ||
1478 | } | 1501 | } |
1479 | 1502 | ||
1480 | /// <summary> | 1503 | /// <summary> |
@@ -3521,21 +3544,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3521 | if (count == 0) | 3544 | if (count == 0) |
3522 | return; | 3545 | return; |
3523 | 3546 | ||
3524 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count]; | 3547 | m_fullUpdateDataBlocksBuilder.Clear(); |
3548 | |||
3525 | for (int i = 0; i < count; i++) | 3549 | for (int i = 0; i < count; i++) |
3526 | { | 3550 | { |
3527 | outPacket.ObjectData[i] = m_primFullUpdates.Dequeue(); | 3551 | ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue(); |
3528 | 3552 | ||
3553 | if (!m_killRecord.Contains(block.ID)) | ||
3554 | { | ||
3555 | m_fullUpdateDataBlocksBuilder.Add(block); | ||
3556 | |||
3529 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); | 3557 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); |
3530 | // if (text.IndexOf("\n") >= 0) | 3558 | // if (text.IndexOf("\n") >= 0) |
3531 | // text = text.Remove(text.IndexOf("\n")); | 3559 | // text = text.Remove(text.IndexOf("\n")); |
3532 | // m_log.DebugFormat( | 3560 | // m_log.DebugFormat( |
3533 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", | 3561 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", |
3534 | // outPacket.ObjectData[i].ID, text, Name); | 3562 | // outPacket.ObjectData[i].ID, text, Name); |
3563 | } | ||
3564 | // else | ||
3565 | // { | ||
3566 | // m_log.WarnFormat( | ||
3567 | // "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name); | ||
3568 | // } | ||
3535 | } | 3569 | } |
3536 | } | ||
3537 | 3570 | ||
3538 | OutPacket(outPacket, ThrottleOutPacketType.State); | 3571 | outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray(); |
3572 | |||
3573 | OutPacket(outPacket, ThrottleOutPacketType.State); | ||
3574 | } | ||
3539 | } | 3575 | } |
3540 | 3576 | ||
3541 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 3577 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) |
@@ -5965,7 +6001,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5965 | || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) | 6001 | || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) |
5966 | { | 6002 | { |
5967 | ScenePresence avatar = null; | 6003 | ScenePresence avatar = null; |
5968 | if (((Scene)m_scene).TryGetAvatar(AgentId, out avatar)) | 6004 | if (((Scene)m_scene).TryGetScenePresence(AgentId, out avatar)) |
5969 | { | 6005 | { |
5970 | if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f) | 6006 | if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f) |
5971 | { | 6007 | { |