diff options
author | UbitUmarov | 2017-01-16 19:01:41 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-16 19:01:41 +0000 |
commit | 733072b6a371f52d5c13f61d4b2a145a370370f5 (patch) | |
tree | 4944059a40baec7bbb70c341a57ea1f82345b830 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | Merge branch 'melanie' (diff) | |
download | opensim-SC-733072b6a371f52d5c13f61d4b2a145a370370f5.zip opensim-SC-733072b6a371f52d5c13f61d4b2a145a370370f5.tar.gz opensim-SC-733072b6a371f52d5c13f61d4b2a145a370370f5.tar.bz2 opensim-SC-733072b6a371f52d5c13f61d4b2a145a370370f5.tar.xz |
chance new effective permissions code to ease aggregation on demand( ie on changes). But still doing full aggregation on checks, so still heavy
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 557b55e..9f99665 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2537,6 +2537,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
2537 | return (uint)Flags | (uint)LocalFlags; | 2537 | return (uint)Flags | (uint)LocalFlags; |
2538 | } | 2538 | } |
2539 | 2539 | ||
2540 | // some of this lines need be moved to other place later | ||
2541 | |||
2542 | // effective permitions considering only this part inventory contents perms | ||
2543 | public uint AggregatedInnerOwnerPerms {get; private set; } | ||
2544 | public uint AggregatedInnerGroupPerms {get; private set; } | ||
2545 | public uint AggregatedInnerEveryonePerms {get; private set; } | ||
2546 | private object InnerPermsLock = new object(); | ||
2547 | |||
2548 | public void AggregateInnerPerms() | ||
2549 | { | ||
2550 | const uint mask = (uint)PermissionMask.AllEffective; | ||
2551 | |||
2552 | uint owner = mask; | ||
2553 | uint group = mask; | ||
2554 | uint everyone = mask; | ||
2555 | |||
2556 | lock(InnerPermsLock) // do we really need this? | ||
2557 | { | ||
2558 | if(Inventory != null) | ||
2559 | Inventory.AggregateInnerPerms(ref owner, ref group, ref everyone); | ||
2560 | |||
2561 | AggregatedInnerOwnerPerms = owner & mask; | ||
2562 | AggregatedInnerGroupPerms = group & mask; | ||
2563 | AggregatedInnerEveryonePerms = everyone & mask; | ||
2564 | } | ||
2565 | } | ||
2566 | |||
2540 | public Vector3 GetGeometricCenter() | 2567 | public Vector3 GetGeometricCenter() |
2541 | { | 2568 | { |
2542 | // this is not real geometric center but a average of positions relative to root prim acording to | 2569 | // this is not real geometric center but a average of positions relative to root prim acording to |