From c554de75010a442753cce29ee06d2b60d7b4701a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Aug 2010 05:45:52 +0200 Subject: Correct display of landmark about info. Also correct region maturity rating in LM info. Maturity is NOT the parcel's setting, that is only for the image and text. Parcel maturity is governed by region maturity. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- .../ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs | 4 +++- .../ServiceConnectorsOut/Land/LocalLandServiceConnector.cs | 4 +++- .../ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs | 6 +++--- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 6 +++++- 5 files changed, 17 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d2d1e8f..af2dd85 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2675,7 +2675,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Bit 0: Mature, bit 7: on sale, other bits: no idea reply.Data.Flags = (byte)( - ((land.Flags & (uint)ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + + (info.AccessLevel > 13 ? (1 << 0) : 0) + ((land.Flags & (uint)ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); Vector3 pos = land.UserLocation; @@ -2683,8 +2683,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { pos = (land.AABBMax + land.AABBMin) * 0.5f; } - reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; - reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; + reply.Data.GlobalX = info.RegionLocX + x; + reply.Data.GlobalY = info.RegionLocY + y; reply.Data.GlobalZ = pos.Z; reply.Data.SimName = Utils.StringToBytes(info.RegionName); reply.Data.SnapshotID = land.SnapshotID; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index bce160a..23251c9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land #region ILandService - public LandData GetLandData(ulong regionHandle, uint x, uint y) + public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", regionHandle, m_Scenes.Count); @@ -130,10 +130,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land if (s.RegionInfo.RegionHandle == regionHandle) { m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); + regionAccess = s.RegionInfo.AccessLevel; return s.GetLandData(x, y); } } m_log.DebugFormat("[LAND IN CONNECTOR]: region handle {0} not found", regionHandle); + regionAccess = 42; return null; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs index cb87f6f..e15f624 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs @@ -116,8 +116,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land #region ILandService - public LandData GetLandData(ulong regionHandle, uint x, uint y) + public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { + regionAccess = 2; m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}", regionHandle, x, y); @@ -126,6 +127,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land if (s.RegionInfo.RegionHandle == regionHandle) { LandData land = s.GetLandData(x, y); + regionAccess = s.RegionInfo.AccessLevel; return land; } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs index 153c2a5..2386060 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs @@ -108,13 +108,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land #region ILandService - public override LandData GetLandData(ulong regionHandle, uint x, uint y) + public override LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) { - LandData land = m_LocalService.GetLandData(regionHandle, x, y); + LandData land = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess); if (land != null) return land; - return base.GetLandData(regionHandle, x, y); + return base.GetLandData(regionHandle, x, y, out regionAccess); } #endregion ILandService diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index cfee1b0..7e29a56 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -51,6 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land public LandData LandData; public ulong RegionHandle; public uint X, Y; + public byte RegionAccess; } public class LandManagementModule : INonSharedRegionModule @@ -1484,13 +1485,15 @@ namespace OpenSim.Region.CoreModules.World.Land if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) { extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; + extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; } else { ILandService landService = m_scene.RequestModuleInterface(); extLandData.LandData = landService.GetLandData(extLandData.RegionHandle, extLandData.X, - extLandData.Y); + extLandData.Y, + out extLandData.RegionAccess); if (extLandData.LandData == null) { // we didn't find the region/land => don't cache @@ -1522,6 +1525,7 @@ namespace OpenSim.Region.CoreModules.World.Land r.RegionName = info.RegionName; r.RegionLocX = (uint)info.RegionLocX; r.RegionLocY = (uint)info.RegionLocY; + r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess); remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y); } else -- cgit v1.1