From 3e75dede1b744fa9a6b7cad00039620de01fb2e2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 7 Jan 2008 02:12:06 +0000 Subject: Persistent prim inventory phase 5. Restart scripts contained in persisted prims on region start. No user functionality exposed yet - no ini switch to enable persistence or restore. A bit more initial work to do. --- OpenSim/Region/Environment/Scenes/Scene.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 215d30d..4156584 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -890,11 +890,12 @@ namespace OpenSim.Region.Environment.Scenes public virtual void LoadPrimsFromStorage(bool m_permissions) { MainLog.Instance.Verbose("SCENE", "Loading objects from datastore"); + List PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); - foreach (SceneObjectGroup prim in PrimsFromDB) + foreach (SceneObjectGroup group in PrimsFromDB) { - AddEntityFromStorage(prim); - SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); + AddEntityFromStorage(group); + SceneObjectPart rootPart = group.GetChildPart(group.UUID); rootPart.ApplySanePermissions(); bool UsePhysics = (((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); @@ -909,6 +910,7 @@ namespace OpenSim.Region.Environment.Scenes rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); } + MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); } -- cgit v1.1