aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs23
1 files changed, 4 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index aa28fa0..0240227 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9908,31 +9908,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9908 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) 9908 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
9909 { 9909 {
9910 m_host.AddScriptLPS(1); 9910 m_host.AddScriptLPS(1);
9911 // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation
9912 // Which probably will be irrelevent in OpenSim....
9913 LandData land = World.GetLandData((float)pos.x, (float)pos.y);
9914 9911
9915 float bonusfactor = (float)World.RegionInfo.RegionSettings.ObjectBonus; 9912 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
9916 9913
9917 if (land == null) 9914 if (lo == null)
9918 {
9919 return 0; 9915 return 0;
9920 }
9921 9916
9922 if (sim_wide != 0) 9917 if (sim_wide != 0)
9923 { 9918 return lo.GetSimulatorMaxPrimCount();
9924 decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor;
9925
9926 return (int)v;
9927 }
9928
9929 else 9919 else
9930 { 9920 return lo.GetParcelMaxPrimCount();
9931 decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
9932
9933 return (int)v;
9934 }
9935
9936 } 9921 }
9937 9922
9938 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) 9923 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)