Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2011-05-14 21:09:52 +01:00
12 changed files with 109 additions and 89 deletions

View File

@@ -10587,31 +10587,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
{
m_host.AddScriptLPS(1);
// Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation
// Which probably will be irrelevent in OpenSim....
LandData land = World.GetLandData((float)pos.x, (float)pos.y);
float bonusfactor = (float)World.RegionInfo.RegionSettings.ObjectBonus;
ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
if (land == null)
{
if (lo == null)
return 0;
}
if (sim_wide != 0)
{
decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
return lo.GetSimulatorMaxPrimCount();
else
{
decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor;
return (int)v;
}
return lo.GetParcelMaxPrimCount();
}
public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)