diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index 3f7e9f90c2..d72b5af3ea 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -1518,7 +1518,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule private void DoInitialSync() { - m_scene.DeleteAllSceneObjects(); + //m_scene.DeleteAllSceneObjects(); + m_scene.DeleteAllSceneObjectsBySync(); SendSyncMessage(SymmetricSyncMessage.MsgType.RegionName, m_scene.RegionInfo.RegionName); m_log.WarnFormat("Sending region name: \"{0}\"", m_scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5efd6d545f..54478ee046 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -689,6 +689,23 @@ namespace OpenSim.Region.Framework.Scenes return m_sceneGraph.UpdateObjectBySynchronization(sog); } + public void DeleteAllSceneObjectsBySync() + { + lock (Entities) + { + EntityBase[] entities = Entities.GetEntities(); + foreach (EntityBase e in entities) + { + if (e is SceneObjectGroup) + { + SceneObjectGroup sog = (SceneObjectGroup)e; + if (!sog.IsAttachment) + DeleteSceneObjectBySynchronization((SceneObjectGroup)e); + } + } + } + } + //Similar to DeleteSceneObject, except that this does not change LastUpdateActorID and LastUpdateTimeStamp public void DeleteSceneObjectBySynchronization(SceneObjectGroup group) {