From a780e01a544e13cc0326ad92ca7927b2443e5ce4 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Wed, 16 Apr 2014 11:43:30 +0300 Subject: Fixed: the parcel flag "Allow Scripts from Group" should only check if the parcel has a Group set; it doesn't have to be *deeded* to the group Also some cleanup of the use of Group ID's (with no change to functionality). --- .../CoreModules/World/Archiver/ArchiveReadRequest.cs | 14 +++++++++----- .../Region/CoreModules/World/Land/LandManagementModule.cs | 3 +-- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 12 +++++++----- 3 files changed, 17 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 54715a8..a1629fb 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -633,12 +633,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver // Validate User and Group UUID's + if (!ResolveGroupUuid(parcel.GroupID)) + parcel.GroupID = UUID.Zero; + if (parcel.IsGroupOwned) { - if (!ResolveGroupUuid(parcel.GroupID)) + if (parcel.GroupID != UUID.Zero) + { + // In group-owned parcels, OwnerID=GroupID. This should already be the case, but let's make sure. + parcel.OwnerID = parcel.GroupID; + } + else { parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; - parcel.GroupID = UUID.Zero; parcel.IsGroupOwned = false; } } @@ -646,9 +653,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver { if (!ResolveUserUuid(scene, parcel.OwnerID)) parcel.OwnerID = m_rootScene.RegionInfo.EstateSettings.EstateOwner; - - if (!ResolveGroupUuid(parcel.GroupID)) - parcel.GroupID = UUID.Zero; } List accessList = new List(); diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 0ecf13b..5ab97ff 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1543,8 +1543,7 @@ namespace OpenSim.Region.CoreModules.World.Land private void IncomingLandObjectFromStorage(LandData data) { - ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); - new_land.LandData = data.Copy(); + ILandObject new_land = new LandObject(data, m_scene); new_land.SetLandBitmapFromByteArray(); AddLandObject(new_land); } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index af19ca3..57fa4d9 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -120,6 +120,12 @@ namespace OpenSim.Region.CoreModules.World.Land #region Constructors + public LandObject(LandData landData, Scene scene) + { + LandData = landData.Copy(); + m_scene = scene; + } + public LandObject(UUID owner_id, bool is_group_owned, Scene scene) { m_scene = scene; @@ -163,12 +169,8 @@ namespace OpenSim.Region.CoreModules.World.Land public ILandObject Copy() { - ILandObject newLand = new LandObject(LandData.OwnerID, LandData.IsGroupOwned, m_scene); - - //Place all new variables here! + ILandObject newLand = new LandObject(LandData, m_scene); newLand.LandBitmap = (bool[,]) (LandBitmap.Clone()); - newLand.LandData = LandData.Copy(); - return newLand; } -- cgit v1.1