aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-09-16 18:04:50 +0100
committerMelanie2010-09-16 18:04:50 +0100
commit58b1ee8e2ca93897415f665bddb5b48966364911 (patch)
treecaa862e2ecbdb2a9c72d85846f2ece1b19c9b8b1 /OpenSim/Region
parentRevert last commit (diff)
parentAdd the modules include line back that i dropped by mistake (diff)
downloadopensim-SC_OLD-58b1ee8e2ca93897415f665bddb5b48966364911.zip
opensim-SC_OLD-58b1ee8e2ca93897415f665bddb5b48966364911.tar.gz
opensim-SC_OLD-58b1ee8e2ca93897415f665bddb5b48966364911.tar.bz2
opensim-SC_OLD-58b1ee8e2ca93897415f665bddb5b48966364911.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs98
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs19
-rw-r--r--OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs2
5 files changed, 60 insertions, 63 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 393cd03..0f1a1ca 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3696,56 +3696,56 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3696 3696
3697 #endregion Block Construction 3697 #endregion Block Construction
3698 } 3698 }
3699 }
3700
3701 #region Packet Sending
3702
3703 const float TIME_DILATION = 1.0f;
3704 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
3705
3706 if (objectUpdateBlocks.IsValueCreated)
3707 {
3708 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
3709
3710 ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
3711 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3712 packet.RegionData.TimeDilation = timeDilation;
3713 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3714
3715 for (int i = 0; i < blocks.Count; i++)
3716 packet.ObjectData[i] = blocks[i];
3717
3718 OutPacket(packet, ThrottleOutPacketType.Task, true);
3719 }
3720
3721 if (compressedUpdateBlocks.IsValueCreated)
3722 {
3723 List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
3724
3725 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
3726 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3727 packet.RegionData.TimeDilation = timeDilation;
3728 packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
3729
3730 for (int i = 0; i < blocks.Count; i++)
3731 packet.ObjectData[i] = blocks[i];
3732
3733 OutPacket(packet, ThrottleOutPacketType.Task, true);
3734 }
3735
3736 if (terseUpdateBlocks.IsValueCreated)
3737 {
3738 List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
3739
3740 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
3741 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3742 packet.RegionData.TimeDilation = timeDilation;
3743 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3744
3745 for (int i = 0; i < blocks.Count; i++)
3746 packet.ObjectData[i] = blocks[i];
3747 3699
3748 OutPacket(packet, ThrottleOutPacketType.Task, true); 3700 #region Packet Sending
3701
3702 const float TIME_DILATION = 1.0f;
3703 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
3704
3705 if (objectUpdateBlocks.IsValueCreated)
3706 {
3707 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
3708
3709 ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
3710 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3711 packet.RegionData.TimeDilation = timeDilation;
3712 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3713
3714 for (int i = 0; i < blocks.Count; i++)
3715 packet.ObjectData[i] = blocks[i];
3716
3717 OutPacket(packet, ThrottleOutPacketType.Task, true);
3718 }
3719
3720 if (compressedUpdateBlocks.IsValueCreated)
3721 {
3722 List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
3723
3724 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
3725 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3726 packet.RegionData.TimeDilation = timeDilation;
3727 packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
3728
3729 for (int i = 0; i < blocks.Count; i++)
3730 packet.ObjectData[i] = blocks[i];
3731
3732 OutPacket(packet, ThrottleOutPacketType.Task, true);
3733 }
3734
3735 if (terseUpdateBlocks.IsValueCreated)
3736 {
3737 List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
3738
3739 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
3740 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3741 packet.RegionData.TimeDilation = timeDilation;
3742 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3743
3744 for (int i = 0; i < blocks.Count; i++)
3745 packet.ObjectData[i] = blocks[i];
3746
3747 OutPacket(packet, ThrottleOutPacketType.Task, true);
3748 }
3749 } 3749 }
3750 3750
3751 #endregion Packet Sending 3751 #endregion Packet Sending
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index 916148b..64567db 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes
105 if (permissionToDelete) 105 if (permissionToDelete)
106 { 106 {
107 foreach (SceneObjectGroup g in objectGroups) 107 foreach (SceneObjectGroup g in objectGroups)
108 g.DeleteGroup(false); 108 g.DeleteGroupFromScene(false);
109 } 109 }
110 } 110 }
111 111
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ac2246c..33e3e5d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2189,7 +2189,7 @@ namespace OpenSim.Region.Framework.Scenes
2189 EventManager.TriggerParcelPrimCountTainted(); 2189 EventManager.TriggerParcelPrimCountTainted();
2190 } 2190 }
2191 2191
2192 group.DeleteGroup(silent); 2192 group.DeleteGroupFromScene(silent);
2193 2193
2194// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2194// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2195 } 2195 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 52f6c1a..3411d18 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.IO; 31using System.IO;
32using System.Diagnostics; 32using System.Linq;
33using System.Threading; 33using System.Threading;
34using System.Xml; 34using System.Xml;
35using System.Xml.Serialization; 35using System.Xml.Serialization;
@@ -1564,7 +1564,7 @@ namespace OpenSim.Region.Framework.Scenes
1564 /// must be handled by the caller. 1564 /// must be handled by the caller.
1565 /// 1565 ///
1566 /// <param name="silent">If true then deletion is not broadcast to clients</param> 1566 /// <param name="silent">If true then deletion is not broadcast to clients</param>
1567 public void DeleteGroup(bool silent) 1567 public void DeleteGroupFromScene(bool silent)
1568 { 1568 {
1569 // We need to keep track of this state in case this group is still queued for backup. 1569 // We need to keep track of this state in case this group is still queued for backup.
1570 m_isDeleted = true; 1570 m_isDeleted = true;
@@ -1572,28 +1572,25 @@ namespace OpenSim.Region.Framework.Scenes
1572 DetachFromBackup(); 1572 DetachFromBackup();
1573 1573
1574 lockPartsForRead(true); 1574 lockPartsForRead(true);
1575 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values); 1575 List<SceneObjectPart> parts = new List<SceneObjectPart>(m_parts.Values);
1576 lockPartsForRead(false); 1576 lockPartsForRead(false);
1577 1577
1578 foreach (SceneObjectPart part in values) 1578 foreach (SceneObjectPart part in parts)
1579 { 1579 {
1580// part.Inventory.RemoveScriptInstances(); 1580 Scene.ForEachScenePresence(delegate (ScenePresence avatar)
1581
1582 Scene.ForEachScenePresence(delegate (ScenePresence sp)
1583 { 1581 {
1584 if (sp.ParentID == LocalId) 1582 if (avatar.ParentID == LocalId)
1585 { 1583 {
1586 sp.StandUp(); 1584 avatar.StandUp();
1587 } 1585 }
1588 1586
1589 if (!silent) 1587 if (!silent)
1590 { 1588 {
1591 part.UpdateFlag = 0; 1589 part.UpdateFlag = 0;
1592 if (part == m_rootPart) 1590 if (part == m_rootPart)
1593 sp.ControllingClient.SendKillObject(m_regionHandle, part.LocalId); 1591 avatar.ControllingClient.SendKillObject(m_regionHandle, part.LocalId);
1594 } 1592 }
1595 }); 1593 });
1596
1597 } 1594 }
1598 1595
1599 1596
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs
index fd59138..0b02a9f 100644
--- a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMModel.cs
@@ -263,7 +263,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
263 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); 263 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor);
264 scene.SendKillObject(scene.Entities[uuid].LocalId); 264 scene.SendKillObject(scene.Entities[uuid].LocalId);
265 scene.SceneGraph.DeleteSceneObject(uuid, false); 265 scene.SceneGraph.DeleteSceneObject(uuid, false);
266 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(false); 266 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroupFromScene(false);
267 } 267 }
268 catch(Exception e) 268 catch(Exception e)
269 { 269 {