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 128954f..03ddbc5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1431,6 +1431,8 @@ namespace OpenSim.Region.Framework.Scenes
1431 RegionInfo.RegionName, e.Message, e.StackTrace); 1431 RegionInfo.RegionName, e.Message, e.StackTrace);
1432 } 1432 }
1433 1433
1434 EventManager.TriggerRegionHeartbeatEnd(this);
1435
1434 maintc = Util.EnvironmentTickCountSubtract(maintc); 1436 maintc = Util.EnvironmentTickCountSubtract(maintc);
1435 maintc = (int)(MinFrameTime * 1000) - maintc; 1437 maintc = (int)(MinFrameTime * 1000) - maintc;
1436 1438
@@ -2837,7 +2839,7 @@ namespace OpenSim.Region.Framework.Scenes
2837 client.OnObjectMaterial += m_sceneGraph.PrimMaterial; 2839 client.OnObjectMaterial += m_sceneGraph.PrimMaterial;
2838 client.OnLinkObjects += LinkObjects; 2840 client.OnLinkObjects += LinkObjects;
2839 client.OnDelinkObjects += DelinkObjects; 2841 client.OnDelinkObjects += DelinkObjects;
2840 client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; 2842 client.OnObjectDuplicate += DuplicateObject;
2841 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; 2843 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay;
2842 client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; 2844 client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags;
2843 client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily; 2845 client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily;
@@ -2965,7 +2967,7 @@ namespace OpenSim.Region.Framework.Scenes
2965 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; 2967 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial;
2966 client.OnLinkObjects -= LinkObjects; 2968 client.OnLinkObjects -= LinkObjects;
2967 client.OnDelinkObjects -= DelinkObjects; 2969 client.OnDelinkObjects -= DelinkObjects;
2968 client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject; 2970 client.OnObjectDuplicate -= DuplicateObject;
2969 client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay; 2971 client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay;
2970 client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags; 2972 client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags;
2971 client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily; 2973 client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily;
@@ -3059,6 +3061,21 @@ namespace OpenSim.Region.Framework.Scenes
3059 } 3061 }
3060 3062
3061 /// <summary> 3063 /// <summary>
3064 /// Duplicates object specified by localID. This is the event handler for IClientAPI.
3065 /// </summary>
3066 /// <param name="originalPrim">ID of object to duplicate</param>
3067 /// <param name="offset"></param>
3068 /// <param name="flags"></param>
3069 /// <param name="AgentID">Agent doing the duplication</param>
3070 /// <param name="GroupID">Group of new object</param>
3071 public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID)
3072 {
3073 SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity);
3074 if (copy != null)
3075 EventManager.TriggerObjectAddedToScene(copy);
3076 }
3077
3078 /// <summary>
3062 /// Duplicates object specified by localID at position raycasted against RayTargetObject using 3079 /// Duplicates object specified by localID at position raycasted against RayTargetObject using
3063 /// RayEnd and RayStart to determine what the angle of the ray is 3080 /// RayEnd and RayStart to determine what the angle of the ray is
3064 /// </summary> 3081 /// </summary>
@@ -3120,19 +3137,22 @@ namespace OpenSim.Region.Framework.Scenes
3120 3137
3121 // stick in offset format from the original prim 3138 // stick in offset format from the original prim
3122 pos = pos - target.ParentGroup.AbsolutePosition; 3139 pos = pos - target.ParentGroup.AbsolutePosition;
3140 SceneObjectGroup copy;
3123 if (CopyRotates) 3141 if (CopyRotates)
3124 { 3142 {
3125 Quaternion worldRot = target2.GetWorldRotation(); 3143 Quaternion worldRot = target2.GetWorldRotation();
3126 3144
3127 // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); 3145 // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
3128 m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); 3146 copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
3129 //obj.Rotation = worldRot; 3147 //obj.Rotation = worldRot;
3130 //obj.UpdateGroupRotationR(worldRot); 3148 //obj.UpdateGroupRotationR(worldRot);
3131 } 3149 }
3132 else 3150 else
3133 { 3151 {
3134 m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); 3152 copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity);
3135 } 3153 }
3154 if (copy != null)
3155 EventManager.TriggerObjectAddedToScene(copy);
3136 } 3156 }
3137 } 3157 }
3138 } 3158 }
@@ -4467,6 +4487,16 @@ namespace OpenSim.Region.Framework.Scenes
4467 return m_sceneGraph.GetGroupByPrim(localID); 4487 return m_sceneGraph.GetGroupByPrim(localID);
4468 } 4488 }
4469 4489
4490 /// <summary>
4491 /// Get a scene object group that contains the prim with the given uuid
4492 /// </summary>
4493 /// <param name="fullID"></param>
4494 /// <returns>null if no scene object group containing that prim is found</returns>
4495 public SceneObjectGroup GetGroupByPrim(UUID fullID)
4496 {
4497 return m_sceneGraph.GetGroupByPrim(fullID);
4498 }
4499
4470 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) 4500 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)
4471 { 4501 {
4472 return m_sceneGraph.TryGetScenePresence(agentID, out sp); 4502 return m_sceneGraph.TryGetScenePresence(agentID, out sp);