diff options
author | Teravus Ovares | 2007-11-30 04:54:15 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-30 04:54:15 +0000 |
commit | 31cec30aa0a589f622635c689b08c2e026898556 (patch) | |
tree | 1f6763396fdd0eed5dff737a878b57f262cc06bc /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | * This extends my first hack to clear out the useragent table for that specif... (diff) | |
download | opensim-SC_OLD-31cec30aa0a589f622635c689b08c2e026898556.zip opensim-SC_OLD-31cec30aa0a589f622635c689b08c2e026898556.tar.gz opensim-SC_OLD-31cec30aa0a589f622635c689b08c2e026898556.tar.bz2 opensim-SC_OLD-31cec30aa0a589f622635c689b08c2e026898556.tar.xz |
* Extended our semi-stupid implementation of in world object permissions to show a user's client that it can't edit a prim if it doesn't have permission.
* Permissions is due for a big revamp. The current way it's done is a hack at best.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 19 |
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); |