diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 0569836..fe60c90 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -454,6 +454,22 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
454 | 454 | ||
455 | private void ValidateAssets() | 455 | private void ValidateAssets() |
456 | { | 456 | { |
457 | if (m_asset.Type == (sbyte)CustomAssetType.AnimationSet) | ||
458 | { | ||
459 | AnimationSet animSet = new AnimationSet(m_asset.Data); | ||
460 | |||
461 | bool allOk = animSet.Validate(x => { | ||
462 | int perms = m_Scene.InventoryService.GetAssetPermissions(ourClient.AgentId, x); | ||
463 | int required = (int)(PermissionMask.Transfer | PermissionMask.Copy); | ||
464 | if ((perms & required) != required) | ||
465 | return false; | ||
466 | return true; | ||
467 | }); | ||
468 | |||
469 | if (!allOk) | ||
470 | m_asset.Data = animSet.ToBytes(); | ||
471 | } | ||
472 | |||
457 | if (m_asset.Type == (sbyte)AssetType.Clothing || | 473 | if (m_asset.Type == (sbyte)AssetType.Clothing || |
458 | m_asset.Type == (sbyte)AssetType.Bodypart) | 474 | m_asset.Type == (sbyte)AssetType.Bodypart) |
459 | { | 475 | { |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs index 84211a9..5c45e4d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs | |||
@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Region.Framework.Scenes.Animation; | 43 | using OpenSim.Region.Framework.Scenes.Animation; |
44 | using OpenSim.Services.Interfaces; | 44 | using OpenSim.Services.Interfaces; |
45 | using AnimationSet = OpenSim.Region.Framework.Scenes.Animation.AnimationSet; | ||
45 | 46 | ||
46 | namespace OpenSim.Region.OptionalModules.Avatar.Animations | 47 | namespace OpenSim.Region.OptionalModules.Avatar.Animations |
47 | { | 48 | { |
@@ -197,4 +198,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations | |||
197 | sb.Append("\n"); | 198 | sb.Append("\n"); |
198 | } | 199 | } |
199 | } | 200 | } |
200 | } \ No newline at end of file | 201 | } |