diff options
author | Melanie | 2009-10-05 10:17:23 +0100 |
---|---|---|
committer | Melanie | 2009-10-05 10:17:23 +0100 |
commit | 0744292b479446eb1ebec828afafacc0189709ca (patch) | |
tree | 3c43b5f425aff61d3625b75b7aef35ce5062ae56 /OpenSim/Region/CoreModules/World | |
parent | Merge branch 'master' into vehicles (diff) | |
parent | Make the asset connector async Get overload return false if the asset (diff) | |
download | opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.zip opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.gz opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.bz2 opensim-SC_OLD-0744292b479446eb1ebec828afafacc0189709ca.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | 10 |
2 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 040d0a3..901144a 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,10 +397,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | // with the powers requested (powers = 0 for no powers check) | 397 | // with the powers requested (powers = 0 for no powers check) |
398 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) | 398 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) |
399 | { | 399 | { |
400 | IClientAPI client = m_scene.GetScenePresence(userID).ControllingClient; | 400 | ScenePresence sp = m_scene.GetScenePresence(userID); |
401 | 401 | if (sp != null) | |
402 | return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && | 402 | { |
403 | ((powers == 0) || ((client.ActiveGroupPowers & powers) == powers))); | 403 | IClientAPI client = sp.ControllingClient; |
404 | |||
405 | return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && | ||
406 | ((powers == 0) || ((client.ActiveGroupPowers & powers) == powers))); | ||
407 | } | ||
408 | return false; | ||
404 | } | 409 | } |
405 | 410 | ||
406 | /// <summary> | 411 | /// <summary> |
@@ -576,9 +581,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
576 | return objectOwnerMask; | 581 | return objectOwnerMask; |
577 | } | 582 | } |
578 | 583 | ||
584 | if ((objectOwnerMask & (uint)PermissionMask.Transfer) != 0 && task.ObjectSaleType != 0) | ||
585 | objectEveryoneMask |= (uint)PrimFlags.ObjectTransfer; | ||
586 | |||
579 | // Group permissions | 587 | // Group permissions |
580 | if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0)) | 588 | if ((task.GroupID != UUID.Zero) && IsGroupMember(task.GroupID, user, 0)) |
581 | return objectGroupMask; | 589 | return objectGroupMask | objectEveryoneMask; |
582 | 590 | ||
583 | return objectEveryoneMask; | 591 | return objectEveryoneMask; |
584 | } | 592 | } |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index 3eb7cd2..a70ef13 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -36,10 +36,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
36 | { | 36 | { |
37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> | 37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> |
38 | { | 38 | { |
39 | public int Index; | 39 | public ushort Index; |
40 | public double Value; | 40 | public float Value; |
41 | 41 | ||
42 | public HeightmapLookupValue(int index, double value) | 42 | public HeightmapLookupValue(ushort index, float value) |
43 | { | 43 | { |
44 | Index = index; | 44 | Index = index; |
45 | Value = value; | 45 | Value = value; |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
62 | { | 62 | { |
63 | for (int j = 0; j < 256; j++) | 63 | for (int j = 0; j < 256; j++) |
64 | { | 64 | { |
65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue(i + (j * 256), ((double)i * ((double)j / 128.0d))); | 65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue((ushort)(i + (j * 256)), (float)((double)i * ((double)j / 128.0d))); |
66 | } | 66 | } |
67 | } | 67 | } |
68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); | 68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
196 | 196 | ||
197 | // The lookup table is pre-sorted, so we either find an exact match or | 197 | // The lookup table is pre-sorted, so we either find an exact match or |
198 | // the next closest (smaller) match with a binary search | 198 | // the next closest (smaller) match with a binary search |
199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, t)); | 199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, (float)t)); |
200 | if (index < 0) | 200 | if (index < 0) |
201 | index = ~index - 1; | 201 | index = ~index - 1; |
202 | 202 | ||