mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user