aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
1 files changed, 5 insertions, 6 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..bda46fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9908,8 +9908,7 @@ 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 9911
9912 // Which probably will be irrelevent in OpenSim....
9913 LandData land = World.GetLandData((float)pos.x, (float)pos.y); 9912 LandData land = World.GetLandData((float)pos.x, (float)pos.y);
9914 9913
9915 float bonusfactor = (float)World.RegionInfo.RegionSettings.ObjectBonus; 9914 float bonusfactor = (float)World.RegionInfo.RegionSettings.ObjectBonus;
@@ -9921,16 +9920,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9921 9920
9922 if (sim_wide != 0) 9921 if (sim_wide != 0)
9923 { 9922 {
9924 decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor; 9923 int v = (int)((land.SimwideArea / 65536.0f) * (float)World.RegionInfo.ObjectCapacity * bonusfactor);
9925 9924
9926 return (int)v; 9925 return v;
9927 } 9926 }
9928 9927
9929 else 9928 else
9930 { 9929 {
9931 decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor; 9930 int v = (int)((land.Area / 65536.0f) * (float)World.RegionInfo.ObjectCapacity * bonusfactor);
9932 9931
9933 return (int)v; 9932 return v;
9934 } 9933 }
9935 9934
9936 } 9935 }