From 6e22faf73e437d3c49121d12edc4b5a4f6c7aefd Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 30 Nov 2007 09:42:36 +0000 Subject: * Refactored away permissions and physics flag duplications --- .../Region/Environment/Scenes/SceneObjectPart.cs | 36 +++------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e2e97c5..6770812 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -467,17 +467,8 @@ namespace OpenSim.Region.Environment.Scenes LLObject.ObjectFlags.CreateSelected | LLObject.ObjectFlags.ObjectOwnerModify; - if (!ParentGroup.m_scene.PermissionsMngr.BypassPermissions) - { - EveryoneMask = (uint)m_flags; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectCopy; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer; - } + ApplyPermissions(); + ApplyPhysics(); ScheduleFullUpdate(); } @@ -505,36 +496,19 @@ namespace OpenSim.Region.Environment.Scenes LastOwnerID = lastOwnerID; UUID = LLUUID.Random(); LocalID = (uint) (localID); - // Todo: Add More parameters from above Shape = shape; OwnershipCost = 0; ObjectSaleType = (byte)0; SalePrice = 0; Category = (uint)0; - // End Todo: /// LastOwnerID = CreatorID; OffsetPosition = position; RotationOffset = rotation; ObjectFlags = flags; - if (!ParentGroup.m_scene.PermissionsMngr.BypassPermissions) - { - EveryoneMask = (uint)m_flags; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectCopy; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner; - EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer; - } - else - { - EveryoneMask = ObjectFlags; - } - - bool UsePhysics = ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); - DoPhysicsPropertyUpdate(UsePhysics, true); + ApplyPermissions(); + ApplyPhysics(); + ScheduleFullUpdate(); } -- cgit v1.1