aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs34
1 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 730ec31..5a1922a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -216,11 +216,15 @@ namespace OpenSim.Region.Framework.Scenes
216 /// If true, we won't persist this object until it changes 216 /// If true, we won't persist this object until it changes
217 /// If false, we'll persist this object immediately 217 /// If false, we'll persist this object immediately
218 /// </param> 218 /// </param>
219 /// <param name="sendClientUpdate">
220 /// If true, we send updates to the client to tell it about this object
221 /// If false, we leave it up to the caller to do this
222 /// </param>
219 /// <returns> 223 /// <returns>
220 /// true if the object was added, false if an object with the same uuid was already in the scene 224 /// true if the object was added, false if an object with the same uuid was already in the scene
221 /// </returns> 225 /// </returns>
222 protected internal bool AddRestoredSceneObject( 226 protected internal bool AddRestoredSceneObject(
223 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) 227 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
224 { 228 {
225 // KF: Check for out-of-region, move inside and make static. 229 // KF: Check for out-of-region, move inside and make static.
226 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, 230 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
@@ -252,8 +256,29 @@ namespace OpenSim.Region.Framework.Scenes
252 sceneObject.HasGroupChanged = true; 256 sceneObject.HasGroupChanged = true;
253 } 257 }
254 258
255 return AddSceneObject(sceneObject, attachToBackup, true); 259 return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
256 } 260 }
261
262// /// <summary>
263// /// Add an object into the scene that has come from storage
264// /// </summary>
265// /// <param name="sceneObject"></param>
266// /// <param name="attachToBackup">
267// /// If true, changes to the object will be reflected in its persisted data
268// /// If false, the persisted data will not be changed even if the object in the scene is changed
269// /// </param>
270// /// <param name="alreadyPersisted">
271// /// If true, we won't persist this object until it changes
272// /// If false, we'll persist this object immediately
273// /// </param>
274// /// <returns>
275// /// true if the object was added, false if an object with the same uuid was already in the scene
276// /// </returns>
277// protected internal bool AddRestoredSceneObject(
278// SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
279// {
280// AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true);
281// }
257 282
258 /// <summary> 283 /// <summary>
259 /// Add a newly created object to the scene. This will both update the scene, and send information about the 284 /// Add a newly created object to the scene. This will both update the scene, and send information about the
@@ -647,11 +672,13 @@ namespace OpenSim.Region.Framework.Scenes
647 protected internal bool AttachObject( 672 protected internal bool AttachObject(
648 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) 673 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)
649 { 674 {
675// Console.WriteLine("HERE A");
650 SceneObjectGroup group = GetGroupByPrim(objectLocalID); 676 SceneObjectGroup group = GetGroupByPrim(objectLocalID);
651 if (group != null) 677 if (group != null)
652 { 678 {
653 if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) 679 if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
654 { 680 {
681// Console.WriteLine("HERE -1");
655 // If the attachment point isn't the same as the one previously used 682 // If the attachment point isn't the same as the one previously used
656 // set it's offset position = 0 so that it appears on the attachment point 683 // set it's offset position = 0 so that it appears on the attachment point
657 // and not in a weird location somewhere unknown. 684 // and not in a weird location somewhere unknown.
@@ -690,9 +717,12 @@ namespace OpenSim.Region.Framework.Scenes
690 itemId = group.GetFromItemID(); 717 itemId = group.GetFromItemID();
691 } 718 }
692 719
720// Console.WriteLine("HERE 0");
693 m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); 721 m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
694 722
723// Console.WriteLine("HERE 1");
695 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); 724 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
725// Console.WriteLine("HERE 2");
696 // In case it is later dropped again, don't let 726 // In case it is later dropped again, don't let
697 // it get cleaned up 727 // it get cleaned up
698 // 728 //