diff options
author | Diva Canto | 2011-05-14 12:57:34 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-14 12:57:34 -0700 |
commit | 082a9ecd31d953fd415b515df4f67078a786f8d5 (patch) | |
tree | 0ea0bf15d6a46120b69803630141141eb477c995 /OpenSim/Region/ScriptEngine | |
parent | Stop spamming Nebadon's console when assets aren't found in the asset server. (diff) | |
parent | refactor: improve PrimLimitsModule to call ILandObject.GetSimulatorMaxPrimCou... (diff) | |
download | opensim-SC-082a9ecd31d953fd415b515df4f67078a786f8d5.zip opensim-SC-082a9ecd31d953fd415b515df4f67078a786f8d5.tar.gz opensim-SC-082a9ecd31d953fd415b515df4f67078a786f8d5.tar.bz2 opensim-SC-082a9ecd31d953fd415b515df4f67078a786f8d5.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 23 |
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) |