diff options
author | Justin Clark-Casey (justincc) | 2011-05-14 02:34:46 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-14 02:34:46 +0100 |
commit | bef1ffa7db3c90f08b3a855e3a5d3d5c7b114549 (patch) | |
tree | 510b5255c3f50ddf5a80045722c1dbc4455a1862 | |
parent | Correct llGetParcelMaxPrims() to use the same calculation as used elsewhere i... (diff) | |
download | opensim-SC-bef1ffa7db3c90f08b3a855e3a5d3d5c7b114549.zip opensim-SC-bef1ffa7db3c90f08b3a855e3a5d3d5c7b114549.tar.gz opensim-SC-bef1ffa7db3c90f08b3a855e3a5d3d5c7b114549.tar.bz2 opensim-SC-bef1ffa7db3c90f08b3a855e3a5d3d5c7b114549.tar.xz |
simplify code in llGetParcelMaxPrims() to use existing code in LandObject rather than duping the algo
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bda46fb..2010283 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9909,29 +9909,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9909 | { | 9909 | { |
9910 | m_host.AddScriptLPS(1); | 9910 | m_host.AddScriptLPS(1); |
9911 | 9911 | ||
9912 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 9912 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
9913 | |||
9914 | float bonusfactor = (float)World.RegionInfo.RegionSettings.ObjectBonus; | ||
9915 | 9913 | ||
9916 | if (land == null) | 9914 | if (lo == null) |
9917 | { | ||
9918 | return 0; | 9915 | return 0; |
9919 | } | ||
9920 | 9916 | ||
9921 | if (sim_wide != 0) | 9917 | if (sim_wide != 0) |
9922 | { | 9918 | return lo.GetSimulatorMaxPrimCount(lo); |
9923 | int v = (int)((land.SimwideArea / 65536.0f) * (float)World.RegionInfo.ObjectCapacity * bonusfactor); | ||
9924 | |||
9925 | return v; | ||
9926 | } | ||
9927 | |||
9928 | else | 9919 | else |
9929 | { | 9920 | return lo.GetParcelMaxPrimCount(lo); |
9930 | int v = (int)((land.Area / 65536.0f) * (float)World.RegionInfo.ObjectCapacity * bonusfactor); | ||
9931 | |||
9932 | return v; | ||
9933 | } | ||
9934 | |||
9935 | } | 9921 | } |
9936 | 9922 | ||
9937 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) | 9923 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) |