aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs32
3 files changed, 32 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 221eb47..8e860fb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -145,6 +145,7 @@ namespace OpenSim.Region.Framework.Scenes
145 145
146 protected SceneCommunicationService m_sceneGridService; 146 protected SceneCommunicationService m_sceneGridService;
147 public bool LoginsDisabled = true; 147 public bool LoginsDisabled = true;
148 public bool LoadingPrims = false;
148 149
149 public new float TimeDilation 150 public new float TimeDilation
150 { 151 {
@@ -1691,6 +1692,7 @@ namespace OpenSim.Region.Framework.Scenes
1691 /// </summary> 1692 /// </summary>
1692 public virtual void LoadPrimsFromStorage(UUID regionID) 1693 public virtual void LoadPrimsFromStorage(UUID regionID)
1693 { 1694 {
1695 LoadingPrims = true;
1694 m_log.Info("[SCENE]: Loading objects from datastore"); 1696 m_log.Info("[SCENE]: Loading objects from datastore");
1695 1697
1696 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); 1698 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
@@ -1714,6 +1716,7 @@ namespace OpenSim.Region.Framework.Scenes
1714 } 1716 }
1715 1717
1716 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 1718 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
1719 LoadingPrims = false;
1717 } 1720 }
1718 1721
1719 1722
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 93f45e0..54b27b2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Framework.Scenes
404 404
405 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 405 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
406 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 406 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
407 && !IsAttachmentCheckFull()) 407 && !IsAttachmentCheckFull() && (!m_scene.LoadingPrims))
408 { 408 {
409 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 409 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
410 } 410 }
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 3bdbdfb..c8f6559 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1359,9 +1359,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1359 string xml = instance.GetXMLState(); 1359 string xml = instance.GetXMLState();
1360 1360
1361 XmlDocument sdoc = new XmlDocument(); 1361 XmlDocument sdoc = new XmlDocument();
1362 sdoc.LoadXml(xml); 1362 bool loadedState = true;
1363 XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState"); 1363 try
1364 XmlNode rootNode = rootL[0]; 1364 {
1365 sdoc.LoadXml(xml);
1366 }
1367 catch (System.Xml.XmlException e)
1368 {
1369 loadedState = false;
1370 }
1371
1372 XmlNodeList rootL = null;
1373 XmlNode rootNode = null;
1374 if (loadedState)
1375 {
1376 rootL = sdoc.GetElementsByTagName("ScriptState");
1377 rootNode = rootL[0];
1378 }
1365 1379
1366 // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"> 1380 // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
1367 XmlDocument doc = new XmlDocument(); 1381 XmlDocument doc = new XmlDocument();
@@ -1377,8 +1391,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1377 stateData.Attributes.Append(engineName); 1391 stateData.Attributes.Append(engineName);
1378 doc.AppendChild(stateData); 1392 doc.AppendChild(stateData);
1379 1393
1394 XmlNode xmlstate = null;
1395
1380 // Add <ScriptState>...</ScriptState> 1396 // Add <ScriptState>...</ScriptState>
1381 XmlNode xmlstate = doc.ImportNode(rootNode, true); 1397 if (loadedState)
1398 {
1399 xmlstate = doc.ImportNode(rootNode, true);
1400 }
1401 else
1402 {
1403 xmlstate = doc.CreateElement("", "ScriptState", "");
1404 }
1405
1382 stateData.AppendChild(xmlstate); 1406 stateData.AppendChild(xmlstate);
1383 1407
1384 string assemName = instance.GetAssemblyName(); 1408 string assemName = instance.GetAssemblyName();