diff options
author | Justin Clark-Casey (justincc) | 2011-05-14 01:26:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-14 03:12:42 +0100 |
commit | c71253bdf11de2a7f17f9a9c5774b4edc4c2c7d8 (patch) | |
tree | a0e0f17f59b1cd37f45df8a7199451b7f1dd6e40 | |
parent | When loading an OAR that doesn't have parcels, create a default parcel (diff) | |
download | opensim-SC_OLD-c71253bdf11de2a7f17f9a9c5774b4edc4c2c7d8.zip opensim-SC_OLD-c71253bdf11de2a7f17f9a9c5774b4edc4c2c7d8.tar.gz opensim-SC_OLD-c71253bdf11de2a7f17f9a9c5774b4edc4c2c7d8.tar.bz2 opensim-SC_OLD-c71253bdf11de2a7f17f9a9c5774b4edc4c2c7d8.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.
-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 | } |