From 340e3ccf16a59512f86f9c5d08bda3ca8179f53e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 14 May 2011 02:42:47 +0100 Subject: refactor: remove thisObject argument from ILandObject.Get*MaxPrimCount() instance methods since it didn't make sense to use anything other than the instance themselves. --- OpenSim/Framework/ILandObject.cs | 4 ++-- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 15 ++++++++------- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs index 5a55b02..0316944 100644 --- a/OpenSim/Framework/ILandObject.cs +++ b/OpenSim/Framework/ILandObject.cs @@ -35,8 +35,8 @@ namespace OpenSim.Framework public interface ILandObject { - int GetParcelMaxPrimCount(ILandObject thisObject); - int GetSimulatorMaxPrimCount(ILandObject thisObject); + int GetParcelMaxPrimCount(); + int GetSimulatorMaxPrimCount(); int GetPrimsFree(); LandData LandData { get; set; } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index c2f104e..560b862 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.World.Land public int GetPrimsFree() { m_scene.EventManager.TriggerParcelPrimCountUpdate(); - int free = GetSimulatorMaxPrimCount(this) - m_landData.SimwidePrims; + int free = GetSimulatorMaxPrimCount() - m_landData.SimwidePrims; return free; } @@ -181,11 +181,11 @@ namespace OpenSim.Region.CoreModules.World.Land overrideSimulatorMaxPrimCount = overrideDel; } - public int GetParcelMaxPrimCount(ILandObject thisObject) + public int GetParcelMaxPrimCount() { if (overrideParcelMaxPrimCount != null) { - return overrideParcelMaxPrimCount(thisObject); + return overrideParcelMaxPrimCount(this); } else { @@ -197,11 +197,12 @@ namespace OpenSim.Region.CoreModules.World.Land return parcelMax; } } - public int GetSimulatorMaxPrimCount(ILandObject thisObject) + + public int GetSimulatorMaxPrimCount() { if (overrideSimulatorMaxPrimCount != null) { - return overrideSimulatorMaxPrimCount(thisObject); + return overrideSimulatorMaxPrimCount(this); } else { @@ -244,8 +245,8 @@ namespace OpenSim.Region.CoreModules.World.Land remote_client.SendLandProperties(seq_id, snap_selection, request_result, this, (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, - GetParcelMaxPrimCount(this), - GetSimulatorMaxPrimCount(this), regionFlags); + GetParcelMaxPrimCount(), + GetSimulatorMaxPrimCount(), regionFlags); } public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2010283..0240227 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -9915,9 +9915,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return 0; if (sim_wide != 0) - return lo.GetSimulatorMaxPrimCount(lo); + return lo.GetSimulatorMaxPrimCount(); else - return lo.GetParcelMaxPrimCount(lo); + return lo.GetParcelMaxPrimCount(); } public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) -- cgit v1.1