diff options
author | Justin Clark-Casey (justincc) | 2010-05-27 21:35:17 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-06-07 19:14:22 +0100 |
commit | 50ddb20204e8eb513212fe80d80b1308280fd47f (patch) | |
tree | f58c4ccd06a5f57985869f4679e3b208f59db912 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Revert "commit code which stops full updates being fired multiple times when ... (diff) | |
download | opensim-SC-50ddb20204e8eb513212fe80d80b1308280fd47f.zip opensim-SC-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.gz opensim-SC-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.bz2 opensim-SC-50ddb20204e8eb513212fe80d80b1308280fd47f.tar.xz |
commit code which stops full updates being fired multiple times when attachments cross standalone region boundaries
lots of messy debug code here too which would need to be removed
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 59a2f41..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 |
@@ -611,11 +636,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
611 | protected internal bool AttachObject( | 636 | protected internal bool AttachObject( |
612 | 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) |
613 | { | 638 | { |
639 | Console.WriteLine("HERE A"); | ||
614 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 640 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
615 | if (group != null) | 641 | if (group != null) |
616 | { | 642 | { |
617 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) | 643 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) |
618 | { | 644 | { |
645 | Console.WriteLine("HERE -1"); | ||
619 | // 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 |
620 | // 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 |
621 | // and not in a weird location somewhere unknown. | 648 | // and not in a weird location somewhere unknown. |
@@ -654,9 +681,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
654 | itemId = group.GetFromItemID(); | 681 | itemId = group.GetFromItemID(); |
655 | } | 682 | } |
656 | 683 | ||
684 | Console.WriteLine("HERE 0"); | ||
657 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); | 685 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); |
658 | 686 | ||
687 | Console.WriteLine("HERE 1"); | ||
659 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 688 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); |
689 | Console.WriteLine("HERE 2"); | ||
660 | // In case it is later dropped again, don't let | 690 | // In case it is later dropped again, don't let |
661 | // it get cleaned up | 691 | // it get cleaned up |
662 | // | 692 | // |