diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 9ff693bc9b..3a9bc7da31 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -1013,7 +1013,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule { // Get the data from message and error check OSDMap data = DeserializeMessage(msg); - string init_actorID = data["actorID"].AsString(); if (data == null) { @@ -1023,11 +1022,20 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule } UUID sogUUID = data["UUID"].AsUUID(); + string init_actorID = data["actorID"].AsString(); + bool softDelete = data["softDelete"].AsBoolean(); SceneObjectGroup sog = m_scene.SceneGraph.GetGroupByPrim(sogUUID); if (sog != null) { - m_scene.DeleteSceneObjectBySynchronization(sog); + if (!softDelete) + { + m_scene.DeleteSceneObjectBySynchronization(sog); + } + else + { + m_scene.UnlinkSceneObject(sog, true); + } } //if this is a relay node, forwards the event @@ -1331,7 +1339,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule /// /// //private void RegionSyncModule_OnObjectBeingRemovedFromScene(SceneObjectGroup sog) - public void SendDeleteObject(SceneObjectGroup sog) + public void SendDeleteObject(SceneObjectGroup sog, bool softDelete) { //m_log.DebugFormat("RegionSyncModule_OnObjectBeingRemovedFromScene called at time {0}:{1}:{2}", DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond); @@ -1344,6 +1352,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //data["localID"] = OSD.FromUInteger(sog.LocalId); data["UUID"] = OSD.FromUUID(sog.UUID); data["actorID"] = OSD.FromString(m_actorID); + data["softDelete"] = OSD.FromBoolean(softDelete); SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data)); SendObjectUpdateToRelevantSyncConnectors(sog, rsm); diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSyncModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSyncModule.cs index 8709d4cd46..5048434859 100755 --- a/OpenSim/Region/Framework/Interfaces/IRegionSyncModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionSyncModule.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Interfaces //void SendUpdatesToSynchronizeState(List sog); void SendSceneUpdates(); void SendTerrainUpdates(string lastUpdateActorID); - void SendDeleteObject(SceneObjectGroup sog); + void SendDeleteObject(SceneObjectGroup sog, bool softDelete); //For propogating scene events to other actors void PublishSceneEvent(EventManager.EventNames ev, Object[] evArgs); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 030144b76b..f2fe7f7364 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2475,7 +2475,7 @@ namespace OpenSim.Region.Framework.Scenes //Propagate the RemovedObject message if (RegionSyncModule != null) { - RegionSyncModule.SendDeleteObject(group); + RegionSyncModule.SendDeleteObject(group, false); } //end of SYMMETRIC SYNC diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 2215b909be..ce518f6442 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2041,9 +2041,9 @@ namespace OpenSim.Region.Framework.Scenes // objectGroup.RootPart.SendScheduledUpdates(); //} -// m_log.DebugFormat( -// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", -// objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); + // m_log.DebugFormat( + // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", + // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); SceneObjectPart linkPart = objectGroup.m_rootPart; @@ -2112,9 +2112,9 @@ namespace OpenSim.Region.Framework.Scenes objectGroup.m_isDeleted = true; objectGroup.m_parts.Clear(); - + // Can't do this yet since backup still makes use of the root part without any synchronization -// objectGroup.m_rootPart = null; + // objectGroup.m_rootPart = null; AttachToBackup(); @@ -2125,6 +2125,12 @@ namespace OpenSim.Region.Framework.Scenes //HasGroupChanged = true; //ScheduleGroupForFullUpdate(); + + //SYMMETRIC SYNC + if (m_scene.RegionSyncModule != null) + m_scene.RegionSyncModule.SendDeleteObject(objectGroup, true); + //end of SYMMETRIC SYNC + } ///