aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 2d74913..cc0f3e1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Environment.Scenes
733 /// <summary> 733 /// <summary>
734 /// Loads the World's objects 734 /// Loads the World's objects
735 /// </summary> 735 /// </summary>
736 public virtual void LoadPrimsFromStorage() 736 public virtual void LoadPrimsFromStorage(bool m_permissions)
737 { 737 {
738 MainLog.Instance.Verbose("Loading objects from datastore"); 738 MainLog.Instance.Verbose("Loading objects from datastore");
739 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); 739 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID);
@@ -741,6 +741,20 @@ namespace OpenSim.Region.Environment.Scenes
741 { 741 {
742 AddEntityFromStorage(prim); 742 AddEntityFromStorage(prim);
743 SceneObjectPart rootPart = prim.GetChildPart(prim.UUID); 743 SceneObjectPart rootPart = prim.GetChildPart(prim.UUID);
744 if (m_permissions)
745 {
746 rootPart.EveryoneMask = rootPart.ObjectFlags;
747 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner;
748 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
749 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify;
750 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove;
751 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner;
752 rootPart.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer;
753 }
754 else
755 {
756 rootPart.EveryoneMask = rootPart.ObjectFlags;
757 }
744 bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); 758 bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim);
745 if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0) 759 if ((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) == 0)
746 rootPart.PhysActor = PhysicsScene.AddPrimShape( 760 rootPart.PhysActor = PhysicsScene.AddPrimShape(
@@ -839,7 +853,8 @@ namespace OpenSim.Region.Environment.Scenes
839 // if grass or tree, make phantom 853 // if grass or tree, make phantom
840 if ((rootPart.Shape.PCode == 95) || (rootPart.Shape.PCode == 255)) 854 if ((rootPart.Shape.PCode == 95) || (rootPart.Shape.PCode == 255))
841 { 855 {
842 rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; 856 rootPart.AddFlag(LLObject.ObjectFlags.Phantom);
857 //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom;
843 } 858 }
844 // if not phantom, add to physics 859 // if not phantom, add to physics
845 bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim); 860 bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0) && m_physicalPrim);