aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs38
1 files changed, 34 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 23fee4e..186e01c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1385,6 +1385,8 @@ namespace OpenSim.Region.Framework.Scenes
1385 RegionInfo.RegionName, e.Message, e.StackTrace); 1385 RegionInfo.RegionName, e.Message, e.StackTrace);
1386 } 1386 }
1387 1387
1388 EventManager.TriggerRegionHeartbeatEnd(this);
1389
1388 maintc = Util.EnvironmentTickCountSubtract(maintc); 1390 maintc = Util.EnvironmentTickCountSubtract(maintc);
1389 maintc = (int)(MinFrameTime * 1000) - maintc; 1391 maintc = (int)(MinFrameTime * 1000) - maintc;
1390 1392
@@ -2714,7 +2716,7 @@ namespace OpenSim.Region.Framework.Scenes
2714 client.OnObjectMaterial += m_sceneGraph.PrimMaterial; 2716 client.OnObjectMaterial += m_sceneGraph.PrimMaterial;
2715 client.OnLinkObjects += LinkObjects; 2717 client.OnLinkObjects += LinkObjects;
2716 client.OnDelinkObjects += DelinkObjects; 2718 client.OnDelinkObjects += DelinkObjects;
2717 client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; 2719 client.OnObjectDuplicate += DuplicateObject;
2718 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; 2720 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay;
2719 client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; 2721 client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags;
2720 client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily; 2722 client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily;
@@ -2841,7 +2843,7 @@ namespace OpenSim.Region.Framework.Scenes
2841 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; 2843 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial;
2842 client.OnLinkObjects -= LinkObjects; 2844 client.OnLinkObjects -= LinkObjects;
2843 client.OnDelinkObjects -= DelinkObjects; 2845 client.OnDelinkObjects -= DelinkObjects;
2844 client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject; 2846 client.OnObjectDuplicate -= DuplicateObject;
2845 client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay; 2847 client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay;
2846 client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags; 2848 client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags;
2847 client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily; 2849 client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily;
@@ -2934,6 +2936,21 @@ namespace OpenSim.Region.Framework.Scenes
2934 } 2936 }
2935 2937
2936 /// <summary> 2938 /// <summary>
2939 /// Duplicates object specified by localID. This is the event handler for IClientAPI.
2940 /// </summary>
2941 /// <param name="originalPrim">ID of object to duplicate</param>
2942 /// <param name="offset"></param>
2943 /// <param name="flags"></param>
2944 /// <param name="AgentID">Agent doing the duplication</param>
2945 /// <param name="GroupID">Group of new object</param>
2946 public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID)
2947 {
2948 SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity);
2949 if (copy != null)
2950 EventManager.TriggerObjectAddedToScene(copy);
2951 }
2952
2953 /// <summary>
2937 /// Duplicates object specified by localID at position raycasted against RayTargetObject using 2954 /// Duplicates object specified by localID at position raycasted against RayTargetObject using
2938 /// RayEnd and RayStart to determine what the angle of the ray is 2955 /// RayEnd and RayStart to determine what the angle of the ray is
2939 /// </summary> 2956 /// </summary>
@@ -2995,19 +3012,22 @@ namespace OpenSim.Region.Framework.Scenes
2995 3012
2996 // stick in offset format from the original prim 3013 // stick in offset format from the original prim
2997 pos = pos - target.ParentGroup.AbsolutePosition; 3014 pos = pos - target.ParentGroup.AbsolutePosition;
3015 SceneObjectGroup copy;
2998 if (CopyRotates) 3016 if (CopyRotates)
2999 { 3017 {
3000 Quaternion worldRot = target2.GetWorldRotation(); 3018 Quaternion worldRot = target2.GetWorldRotation();
3001 3019
3002 // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); 3020 // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
3003 m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); 3021 copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
3004 //obj.Rotation = worldRot; 3022 //obj.Rotation = worldRot;
3005 //obj.UpdateGroupRotationR(worldRot); 3023 //obj.UpdateGroupRotationR(worldRot);
3006 } 3024 }
3007 else 3025 else
3008 { 3026 {
3009 m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); 3027 copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity);
3010 } 3028 }
3029 if (copy != null)
3030 EventManager.TriggerObjectAddedToScene(copy);
3011 } 3031 }
3012 } 3032 }
3013 } 3033 }
@@ -4292,6 +4312,16 @@ namespace OpenSim.Region.Framework.Scenes
4292 return m_sceneGraph.GetGroupByPrim(localID); 4312 return m_sceneGraph.GetGroupByPrim(localID);
4293 } 4313 }
4294 4314
4315 /// <summary>
4316 /// Get a scene object group that contains the prim with the given uuid
4317 /// </summary>
4318 /// <param name="fullID"></param>
4319 /// <returns>null if no scene object group containing that prim is found</returns>
4320 public SceneObjectGroup GetGroupByPrim(UUID fullID)
4321 {
4322 return m_sceneGraph.GetGroupByPrim(fullID);
4323 }
4324
4295 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) 4325 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)
4296 { 4326 {
4297 return m_sceneGraph.TryGetScenePresence(agentID, out sp); 4327 return m_sceneGraph.TryGetScenePresence(agentID, out sp);