diff options
author | Justin Clark-Casey (justincc) | 2011-05-14 01:26:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-14 01:26:04 +0100 |
commit | 1d8607914170d285f15b4d48a3ae7a17f56f6aa8 (patch) | |
tree | 845bde81d1fd74782242ad00c9a8d179ca14a713 /OpenSim/Region/ScriptEngine/Shared | |
parent | Minor doc change to see if this provokes a good panda build (diff) | |
download | opensim-SC_OLD-1d8607914170d285f15b4d48a3ae7a17f56f6aa8.zip opensim-SC_OLD-1d8607914170d285f15b4d48a3ae7a17f56f6aa8.tar.gz opensim-SC_OLD-1d8607914170d285f15b4d48a3ae7a17f56f6aa8.tar.bz2 opensim-SC_OLD-1d8607914170d285f15b4d48a3ae7a17f56f6aa8.tar.xz |
Correct llGetParcelMaxPrims() to use the same calculation as used elsewhere instead of the old 0.22 prims/meter squared fudge factor.
Thanks to tglion for this.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 |
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 | } |