From 50ddb20204e8eb513212fe80d80b1308280fd47f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 27 May 2010 21:35:17 +0100
Subject: 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
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 34 +++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
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
/// If true, we won't persist this object until it changes
/// If false, we'll persist this object immediately
///
+ ///
+ /// If true, we send updates to the client to tell it about this object
+ /// If false, we leave it up to the caller to do this
+ ///
///
/// true if the object was added, false if an object with the same uuid was already in the scene
///
protected internal bool AddRestoredSceneObject(
- SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
+ SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
{
if (!alreadyPersisted)
{
@@ -228,8 +232,29 @@ namespace OpenSim.Region.Framework.Scenes
sceneObject.HasGroupChanged = true;
}
- return AddSceneObject(sceneObject, attachToBackup, true);
+ return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
}
+
+// ///
+// /// Add an object into the scene that has come from storage
+// ///
+// ///
+// ///
+// /// If true, changes to the object will be reflected in its persisted data
+// /// If false, the persisted data will not be changed even if the object in the scene is changed
+// ///
+// ///
+// /// If true, we won't persist this object until it changes
+// /// If false, we'll persist this object immediately
+// ///
+// ///
+// /// true if the object was added, false if an object with the same uuid was already in the scene
+// ///
+// protected internal bool AddRestoredSceneObject(
+// SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
+// {
+// AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true);
+// }
///
/// 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
protected internal bool AttachObject(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)
{
+ Console.WriteLine("HERE A");
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
if (group != null)
{
if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
{
+ Console.WriteLine("HERE -1");
// If the attachment point isn't the same as the one previously used
// set it's offset position = 0 so that it appears on the attachment point
// and not in a weird location somewhere unknown.
@@ -654,9 +681,12 @@ namespace OpenSim.Region.Framework.Scenes
itemId = group.GetFromItemID();
}
+ Console.WriteLine("HERE 0");
m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
+ Console.WriteLine("HERE 1");
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
+ Console.WriteLine("HERE 2");
// In case it is later dropped again, don't let
// it get cleaned up
//
--
cgit v1.1