diff options
author | Melanie Thielker | 2014-10-03 18:27:27 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-10-03 18:27:27 +0200 |
commit | 93fa3777d2de7d5d17039ee18014c9d73e13cbc5 (patch) | |
tree | a54caa4ae0003025024918088c1c88094c219663 /OpenSim/Framework | |
parent | Also store names of assets in the AnimationSet (diff) | |
parent | clean up coments, use a even faster XY move request detection (diff) | |
download | opensim-SC_OLD-93fa3777d2de7d5d17039ee18014c9d73e13cbc5.zip opensim-SC_OLD-93fa3777d2de7d5d17039ee18014c9d73e13cbc5.tar.gz opensim-SC_OLD-93fa3777d2de7d5d17039ee18014c9d73e13cbc5.tar.bz2 opensim-SC_OLD-93fa3777d2de7d5d17039ee18014c9d73e13cbc5.tar.xz |
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AnimationSet.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs index fa71405..6c5b15c 100644 --- a/OpenSim/Framework/AnimationSet.cs +++ b/OpenSim/Framework/AnimationSet.cs | |||
@@ -37,6 +37,54 @@ namespace OpenSim.Framework | |||
37 | { | 37 | { |
38 | private bool m_parseError = false; | 38 | private bool m_parseError = false; |
39 | 39 | ||
40 | public const uint createBasePermitions = (uint)(PermissionMask.All); // no export ? | ||
41 | public const uint createNextPermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify); | ||
42 | |||
43 | public const uint allowedBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify); | ||
44 | public const uint allowedNextPermitions = 0; | ||
45 | |||
46 | public static void setCreateItemPermitions(InventoryItemBase it) | ||
47 | { | ||
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; | ||
58 | } | ||
59 | |||
60 | public static void enforceItemPermitions(InventoryItemBase it, bool IsCreator) | ||
61 | { | ||
62 | if (it == null) | ||
63 | return; | ||
64 | |||
65 | uint bp; | ||
66 | uint np; | ||
67 | |||
68 | if (IsCreator) | ||
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; | ||
84 | it.GroupPermissions = 0; | ||
85 | it.EveryOnePermissions = 0; | ||
86 | } | ||
87 | |||
40 | public int AnimationCount { get; private set; } | 88 | public int AnimationCount { get; private set; } |
41 | private Dictionary<string, KeyValuePair<string, UUID>> m_animations = new Dictionary<string, KeyValuePair<string, UUID>>(); | 89 | private Dictionary<string, KeyValuePair<string, UUID>> m_animations = new Dictionary<string, KeyValuePair<string, UUID>>(); |
42 | 90 | ||