diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 090f379..fb01140 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 |
@@ -560,7 +585,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
560 | // m_log.DebugFormat( | 585 | // m_log.DebugFormat( |
561 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | 586 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", |
562 | // objatt.Name, remoteClient.Name, AttachmentPt); | 587 | // objatt.Name, remoteClient.Name, AttachmentPt); |
563 | |||
564 | if (objatt != null) | 588 | if (objatt != null) |
565 | { | 589 | { |
566 | bool tainted = false; | 590 | bool tainted = false; |
@@ -648,11 +672,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
648 | protected internal bool AttachObject( | 672 | protected internal bool AttachObject( |
649 | 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) |
650 | { | 674 | { |
675 | Console.WriteLine("HERE A"); | ||
651 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 676 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
652 | if (group != null) | 677 | if (group != null) |
653 | { | 678 | { |
654 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) | 679 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) |
655 | { | 680 | { |
681 | Console.WriteLine("HERE -1"); | ||
656 | // 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 |
657 | // 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 |
658 | // and not in a weird location somewhere unknown. | 684 | // and not in a weird location somewhere unknown. |
@@ -691,9 +717,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
691 | itemId = group.GetFromItemID(); | 717 | itemId = group.GetFromItemID(); |
692 | } | 718 | } |
693 | 719 | ||
720 | Console.WriteLine("HERE 0"); | ||
694 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); | 721 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); |
695 | 722 | ||
723 | Console.WriteLine("HERE 1"); | ||
696 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 724 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); |
725 | Console.WriteLine("HERE 2"); | ||
697 | // In case it is later dropped again, don't let | 726 | // In case it is later dropped again, don't let |
698 | // it get cleaned up | 727 | // it get cleaned up |
699 | // | 728 | // |