diff options
author | Justin Clark-Casey (justincc) | 2011-05-14 02:42:47 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-14 02:42:47 +0100 |
commit | 340e3ccf16a59512f86f9c5d08bda3ca8179f53e (patch) | |
tree | c15f67e131dfed0dd527160093ede7158ce482f3 | |
parent | simplify code in llGetParcelMaxPrims() to use existing code in LandObject rat... (diff) | |
download | opensim-SC_OLD-340e3ccf16a59512f86f9c5d08bda3ca8179f53e.zip opensim-SC_OLD-340e3ccf16a59512f86f9c5d08bda3ca8179f53e.tar.gz opensim-SC_OLD-340e3ccf16a59512f86f9c5d08bda3ca8179f53e.tar.bz2 opensim-SC_OLD-340e3ccf16a59512f86f9c5d08bda3ca8179f53e.tar.xz |
refactor: remove thisObject argument from ILandObject.Get*MaxPrimCount() instance methods since it didn't make sense to use anything other than the instance themselves.
-rw-r--r-- | OpenSim/Framework/ILandObject.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/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 | |||
35 | 35 | ||
36 | public interface ILandObject | 36 | public interface ILandObject |
37 | { | 37 | { |
38 | int GetParcelMaxPrimCount(ILandObject thisObject); | 38 | int GetParcelMaxPrimCount(); |
39 | int GetSimulatorMaxPrimCount(ILandObject thisObject); | 39 | int GetSimulatorMaxPrimCount(); |
40 | int GetPrimsFree(); | 40 | int GetPrimsFree(); |
41 | 41 | ||
42 | LandData LandData { get; set; } | 42 | 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 | |||
67 | public int GetPrimsFree() | 67 | public int GetPrimsFree() |
68 | { | 68 | { |
69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | 69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); |
70 | int free = GetSimulatorMaxPrimCount(this) - m_landData.SimwidePrims; | 70 | int free = GetSimulatorMaxPrimCount() - m_landData.SimwidePrims; |
71 | return free; | 71 | return free; |
72 | } | 72 | } |
73 | 73 | ||
@@ -181,11 +181,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
181 | overrideSimulatorMaxPrimCount = overrideDel; | 181 | overrideSimulatorMaxPrimCount = overrideDel; |
182 | } | 182 | } |
183 | 183 | ||
184 | public int GetParcelMaxPrimCount(ILandObject thisObject) | 184 | public int GetParcelMaxPrimCount() |
185 | { | 185 | { |
186 | if (overrideParcelMaxPrimCount != null) | 186 | if (overrideParcelMaxPrimCount != null) |
187 | { | 187 | { |
188 | return overrideParcelMaxPrimCount(thisObject); | 188 | return overrideParcelMaxPrimCount(this); |
189 | } | 189 | } |
190 | else | 190 | else |
191 | { | 191 | { |
@@ -197,11 +197,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
197 | return parcelMax; | 197 | return parcelMax; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | public int GetSimulatorMaxPrimCount(ILandObject thisObject) | 200 | |
201 | public int GetSimulatorMaxPrimCount() | ||
201 | { | 202 | { |
202 | if (overrideSimulatorMaxPrimCount != null) | 203 | if (overrideSimulatorMaxPrimCount != null) |
203 | { | 204 | { |
204 | return overrideSimulatorMaxPrimCount(thisObject); | 205 | return overrideSimulatorMaxPrimCount(this); |
205 | } | 206 | } |
206 | else | 207 | else |
207 | { | 208 | { |
@@ -244,8 +245,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
244 | remote_client.SendLandProperties(seq_id, | 245 | remote_client.SendLandProperties(seq_id, |
245 | snap_selection, request_result, this, | 246 | snap_selection, request_result, this, |
246 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, | 247 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, |
247 | GetParcelMaxPrimCount(this), | 248 | GetParcelMaxPrimCount(), |
248 | GetSimulatorMaxPrimCount(this), regionFlags); | 249 | GetSimulatorMaxPrimCount(), regionFlags); |
249 | } | 250 | } |
250 | 251 | ||
251 | public void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client) | 252 | 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 | |||
9915 | return 0; | 9915 | return 0; |
9916 | 9916 | ||
9917 | if (sim_wide != 0) | 9917 | if (sim_wide != 0) |
9918 | return lo.GetSimulatorMaxPrimCount(lo); | 9918 | return lo.GetSimulatorMaxPrimCount(); |
9919 | else | 9919 | else |
9920 | return lo.GetParcelMaxPrimCount(lo); | 9920 | return lo.GetParcelMaxPrimCount(); |
9921 | } | 9921 | } |
9922 | 9922 | ||
9923 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) | 9923 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) |