From 2c6272d11a916953bee28ed4b36d839e8c8dd4a2 Mon Sep 17 00:00:00 2001
From: Dan Lake
Date: Thu, 19 Jan 2012 02:53:21 -0800
Subject: Add a version of GetGroupByPrim to Scene which accepts UUID instead
of localID
---
OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 027ec96..3d8c714 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4294,6 +4294,16 @@ namespace OpenSim.Region.Framework.Scenes
public SceneObjectGroup GetGroupByPrim(uint localID)
{
return m_sceneGraph.GetGroupByPrim(localID);
+ }
+
+ ///
+ /// Get a scene object group that contains the prim with the given uuid
+ ///
+ ///
+ /// null if no scene object group containing that prim is found
+ public SceneObjectGroup GetGroupByPrim(UUID fullID)
+ {
+ return m_sceneGraph.GetGroupByPrim(fullID);
}
public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)
--
cgit v1.1
From 0ce9ad4a56ecfcb021208acb4e9650612bc7e931 Mon Sep 17 00:00:00 2001
From: Dan Lake
Date: Wed, 1 Feb 2012 16:27:20 -0800
Subject: Add event RegionHeartbeatEnd for modules interested in coordinating
activity with region heartbeats
---
OpenSim/Region/Framework/Scenes/Scene.cs | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index bfe8d2c..bbd2163 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1385,6 +1385,8 @@ namespace OpenSim.Region.Framework.Scenes
RegionInfo.RegionName, e.Message, e.StackTrace);
}
+ EventManager.TriggerRegionHeartbeatEnd(this);
+
maintc = Util.EnvironmentTickCountSubtract(maintc);
maintc = (int)(MinFrameTime * 1000) - maintc;
@@ -4290,16 +4292,16 @@ namespace OpenSim.Region.Framework.Scenes
public SceneObjectGroup GetGroupByPrim(uint localID)
{
return m_sceneGraph.GetGroupByPrim(localID);
- }
-
- ///
- /// Get a scene object group that contains the prim with the given uuid
- ///
- ///
- /// null if no scene object group containing that prim is found
- public SceneObjectGroup GetGroupByPrim(UUID fullID)
- {
- return m_sceneGraph.GetGroupByPrim(fullID);
+ }
+
+ ///
+ /// Get a scene object group that contains the prim with the given uuid
+ ///
+ ///
+ /// null if no scene object group containing that prim is found
+ public SceneObjectGroup GetGroupByPrim(UUID fullID)
+ {
+ return m_sceneGraph.GetGroupByPrim(fullID);
}
public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)
--
cgit v1.1
From 146d78edfa2974038a7efe3f1c0f3d0e8d8520ae Mon Sep 17 00:00:00 2001
From: Dan Lake
Date: Thu, 2 Feb 2012 17:41:05 -0800
Subject: ObjectAddedToScene event should be fired when duplicating objects
---
OpenSim/Region/Framework/Scenes/Scene.cs | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index bbd2163..186e01c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.Framework.Scenes
client.OnObjectMaterial += m_sceneGraph.PrimMaterial;
client.OnLinkObjects += LinkObjects;
client.OnDelinkObjects += DelinkObjects;
- client.OnObjectDuplicate += m_sceneGraph.DuplicateObject;
+ client.OnObjectDuplicate += DuplicateObject;
client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay;
client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags;
client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily;
@@ -2843,7 +2843,7 @@ namespace OpenSim.Region.Framework.Scenes
client.OnObjectMaterial -= m_sceneGraph.PrimMaterial;
client.OnLinkObjects -= LinkObjects;
client.OnDelinkObjects -= DelinkObjects;
- client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject;
+ client.OnObjectDuplicate -= DuplicateObject;
client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay;
client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags;
client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily;
@@ -2936,6 +2936,21 @@ namespace OpenSim.Region.Framework.Scenes
}
///
+ /// Duplicates object specified by localID. This is the event handler for IClientAPI.
+ ///
+ /// ID of object to duplicate
+ ///
+ ///
+ /// Agent doing the duplication
+ /// Group of new object
+ public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID)
+ {
+ SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity);
+ if (copy != null)
+ EventManager.TriggerObjectAddedToScene(copy);
+ }
+
+ ///
/// Duplicates object specified by localID at position raycasted against RayTargetObject using
/// RayEnd and RayStart to determine what the angle of the ray is
///
@@ -2997,19 +3012,22 @@ namespace OpenSim.Region.Framework.Scenes
// stick in offset format from the original prim
pos = pos - target.ParentGroup.AbsolutePosition;
+ SceneObjectGroup copy;
if (CopyRotates)
{
Quaternion worldRot = target2.GetWorldRotation();
// SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
- m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
+ copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
//obj.Rotation = worldRot;
//obj.UpdateGroupRotationR(worldRot);
}
else
{
- m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID);
+ copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity);
}
+ if (copy != null)
+ EventManager.TriggerObjectAddedToScene(copy);
}
}
}
--
cgit v1.1