aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AnimationSet.cs47
1 files changed, 36 insertions, 11 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs
index 7e6aa17..1743376 100644
--- a/OpenSim/Framework/AnimationSet.cs
+++ b/OpenSim/Framework/AnimationSet.cs
@@ -33,30 +33,55 @@ namespace OpenSim.Framework
33{ 33{
34 public delegate bool AnimationSetValidator(UUID animID); 34 public delegate bool AnimationSetValidator(UUID animID);
35 35
36
37 public class AnimationSet 36 public class AnimationSet
38 { 37 {
39 private readonly int m_maxAnimations = 255; 38 private readonly int m_maxAnimations = 255;
40 39
41 public const uint allowedPermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify); 40 public const uint createBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
41 public const uint createNextPermitions = (uint)PermissionMask.Modify;
42
43 public const uint allowedBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
44 public const uint allowedNextPermitions = (uint)PermissionMask.Modify;
42 45
43 public static uint enforcePermition(uint currentPerm) 46 public static void setCreateItemPermitions(InventoryItemBase it)
44 { 47 {
45 return currentPerm & allowedPermitions; 48 if (it == null)
49 return;
50
51 it.BasePermissions = createBasePermitions;
52 it.CurrentPermissions = createBasePermitions;
53 // it.GroupPermissions &= allowedPermitions;
54 it.NextPermissions = createNextPermitions;
55 // it.EveryOnePermissions &= allowedPermitions;
56 it.GroupPermissions = 0;
57 it.EveryOnePermissions = 0;
46 } 58 }
47 59
48 public static void enforceItemPermitions(InventoryItemBase it) 60 public static void enforceItemPermitions(InventoryItemBase it, bool IsCreator)
49 { 61 {
50 if (it == null) 62 if (it == null)
51 return; 63 return;
52 64
53 it.BasePermissions &= allowedPermitions; 65 uint bp;
54 it.CurrentPermissions &= allowedPermitions; 66 uint np;
55// it.GroupPermissions &= allowedPermitions; 67
56// it.NextPermissions &= allowedPermitions; 68 if (IsCreator)
57// it.EveryOnePermissions &= allowedPermitions; 69 {
70 bp = createBasePermitions;
71 np = createNextPermitions;
72 }
73 else
74 {
75 bp = allowedBasePermitions;
76 np = allowedNextPermitions;
77 }
78
79 it.BasePermissions &= bp;
80 it.CurrentPermissions &= bp;
81 // it.GroupPermissions &= allowedPermitions;
82 it.NextPermissions &= np;
83 // it.EveryOnePermissions &= allowedPermitions;
58 it.GroupPermissions = 0; 84 it.GroupPermissions = 0;
59 it.NextPermissions = 0;
60 it.EveryOnePermissions = 0; 85 it.EveryOnePermissions = 0;
61 } 86 }
62 87