diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index a2c42f6629..44049e7b17 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs @@ -26,6 +26,8 @@ */ using System.Collections.Generic; +using System.Runtime.CompilerServices; + using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -100,97 +102,115 @@ namespace OpenSim.Region.CoreModules.World.Land } #region ILandChannel Members - + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(float x_float, float y_float) { return m_landManagementModule != null ? m_landManagementModule.GetLandObject(x_float, y_float) : null; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(int localID) { return m_landManagementModule != null ? m_landManagementModule.GetLandObject(localID) : null; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(UUID GlobalID) { return m_landManagementModule != null ? m_landManagementModule.GetLandObject(GlobalID) : null; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(Vector3 position) { return GetLandObject(position.X, position.Y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(int x, int y) { return m_landManagementModule != null ? m_landManagementModule.GetLandObject(x, y) : null; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObjectClippedXY(float x, float y) { return m_landManagementModule != null ? m_landManagementModule.GetLandObjectClippedXY(x, y) : null; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public List AllParcels() { return m_landManagementModule != null ? m_landManagementModule.AllParcels() : new List(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Clear(bool setupDefaultParcel) { m_landManagementModule?.Clear(setupDefaultParcel); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public List ParcelsNearPoint(Vector3 position) { return m_landManagementModule != null ? m_landManagementModule.ParcelsNearPoint(position) : new List(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool IsForcefulBansAllowed() { return m_landManagementModule != null ? m_landManagementModule.AllowedForcefulBans : false; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void UpdateLandObject(int localID, LandData data) { m_landManagementModule?.UpdateLandObject(localID, data); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SendParcelsOverlay(IClientAPI client) { m_landManagementModule?.SendParcelOverlay(client); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { m_landManagementModule?.Join(start_x, start_y, end_x, end_y, attempting_user_id); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { m_landManagementModule?.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) { m_landManagementModule?.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) { m_landManagementModule?.setParcelObjectMaxOverride(overrideDel); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) { m_landManagementModule?.setSimulatorObjectMaxOverride(overrideDel); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) { m_landManagementModule?.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void sendClientInitialLandInfo(IClientAPI remoteClient, bool overlay) { m_landManagementModule?.sendClientInitialLandInfo(remoteClient, overlay); diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 5c4fcce0b2..3332417978 100755 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -30,7 +30,9 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Reflection; +using System.Runtime.CompilerServices; using System.Text; + using log4net; using Nini.Config; using OpenMetaverse; @@ -49,6 +51,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OSDMap = OpenMetaverse.StructuredData.OSDMap; using OSDArray = OpenMetaverse.StructuredData.OSDArray; +using Extension = Mono.Addins.ExtensionAttribute; namespace OpenSim.Region.CoreModules.World.Land { // used for caching @@ -1003,11 +1006,13 @@ namespace OpenSim.Region.CoreModules.World.Land // Public entry. // Throws exception if land object is not found + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(int x, int y) { return GetLandObject(x, y, false /* returnNullIfLandObjectNotFound */); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObject(int x, int y, bool returnNullIfLandObjectOutsideBounds) { if (x >= m_regionSizeX || y >= m_regionSizeY || x < 0 || y < 0) @@ -1027,15 +1032,16 @@ namespace OpenSim.Region.CoreModules.World.Land { try { - return m_landList[m_landIDList[x / Constants.LandUnit, y / Constants.LandUnit]]; + return m_landList[m_landIDList[x / Constants.LandUnit, y / Constants.LandUnit]]; } catch (IndexOutOfRangeException) { - return null; + return null; } } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObjectinLandUnits(int x, int y) { if (m_landList.Count == 0 || m_landIDList == null) @@ -1054,6 +1060,7 @@ namespace OpenSim.Region.CoreModules.World.Land } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ILandObject GetLandObjectinLandUnitsInt(int x, int y) { lock (m_landIDList) @@ -1069,6 +1076,7 @@ namespace OpenSim.Region.CoreModules.World.Land } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetLandObjectIDinLandUnits(int x, int y) { lock (m_landIDList)