From ac1a34714dec8745ec78bf530d74ada0943c6758 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 17 Jul 2010 07:19:58 +0100 Subject: Allow Megaregions to start properly after an unclean shutdown --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 +++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b0f4ac0..9141d44 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -136,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes protected SceneCommunicationService m_sceneGridService; public bool LoginsDisabled = true; + public bool LoadingPrims = false; public new float TimeDilation { @@ -1877,6 +1878,7 @@ namespace OpenSim.Region.Framework.Scenes /// public virtual void LoadPrimsFromStorage(UUID regionID) { + LoadingPrims = true; m_log.Info("[SCENE]: Loading objects from datastore"); List PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); @@ -1900,6 +1902,7 @@ namespace OpenSim.Region.Framework.Scenes } m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); + LoadingPrims = false; } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1ca390a..17275d0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) - && !IsAttachmentCheckFull()) + && !IsAttachmentCheckFull() && (!m_scene.LoadingPrims)) { m_scene.CrossPrimGroupIntoNewRegion(val, this, true); } -- cgit v1.1