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 ad24160..fa3c5eb 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 | if (!alreadyPersisted) | 229 | if (!alreadyPersisted) |
226 | { | 230 | { |
@@ -228,8 +232,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
228 | sceneObject.HasGroupChanged = true; | 232 | sceneObject.HasGroupChanged = true; |
229 | } | 233 | } |
230 | 234 | ||
231 | return AddSceneObject(sceneObject, attachToBackup, true); | 235 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
232 | } | 236 | } |
237 | |||
238 | // /// <summary> | ||
239 | // /// Add an object into the scene that has come from storage | ||
240 | // /// </summary> | ||
241 | // /// <param name="sceneObject"></param> | ||
242 | // /// <param name="attachToBackup"> | ||
243 | // /// If true, changes to the object will be reflected in its persisted data | ||
244 | // /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
245 | // /// </param> | ||
246 | // /// <param name="alreadyPersisted"> | ||
247 | // /// If true, we won't persist this object until it changes | ||
248 | // /// If false, we'll persist this object immediately | ||
249 | // /// </param> | ||
250 | // /// <returns> | ||
251 | // /// true if the object was added, false if an object with the same uuid was already in the scene | ||
252 | // /// </returns> | ||
253 | // protected internal bool AddRestoredSceneObject( | ||
254 | // SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | ||
255 | // { | ||
256 | // AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); | ||
257 | // } | ||
233 | 258 | ||
234 | /// <summary> | 259 | /// <summary> |
235 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | 260 | /// Add a newly created object to the scene. This will both update the scene, and send information about the |
@@ -536,7 +561,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
536 | // m_log.DebugFormat( | 561 | // m_log.DebugFormat( |
537 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | 562 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", |
538 | // objatt.Name, remoteClient.Name, AttachmentPt); | 563 | // objatt.Name, remoteClient.Name, AttachmentPt); |
539 | |||
540 | if (objatt != null) | 564 | if (objatt != null) |
541 | { | 565 | { |
542 | bool tainted = false; | 566 | bool tainted = false; |
@@ -612,11 +636,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
612 | protected internal bool AttachObject( | 636 | protected internal bool AttachObject( |
613 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) | 637 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) |
614 | { | 638 | { |
639 | Console.WriteLine("HERE A"); | ||
615 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 640 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
616 | if (group != null) | 641 | if (group != null) |
617 | { | 642 | { |
618 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) | 643 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) |
619 | { | 644 | { |
645 | Console.WriteLine("HERE -1"); | ||
620 | // If the attachment point isn't the same as the one previously used | 646 | // If the attachment point isn't the same as the one previously used |
621 | // set it's offset position = 0 so that it appears on the attachment point | 647 | // set it's offset position = 0 so that it appears on the attachment point |
622 | // and not in a weird location somewhere unknown. | 648 | // and not in a weird location somewhere unknown. |
@@ -655,9 +681,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
655 | itemId = group.GetFromItemID(); | 681 | itemId = group.GetFromItemID(); |
656 | } | 682 | } |
657 | 683 | ||
684 | Console.WriteLine("HERE 0"); | ||
658 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); | 685 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); |
659 | 686 | ||
687 | Console.WriteLine("HERE 1"); | ||
660 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 688 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); |
689 | Console.WriteLine("HERE 2"); | ||
661 | // In case it is later dropped again, don't let | 690 | // In case it is later dropped again, don't let |
662 | // it get cleaned up | 691 | // it get cleaned up |
663 | // | 692 | // |