mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
limit number of prims on physical objects. Not all cases covered still
This commit is contained in:
@@ -1400,6 +1400,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
SceneObjectGroup group = m_host.ParentGroup;
|
||||
bool allow = true;
|
||||
|
||||
int maxprims = World.m_linksetPhysCapacity;
|
||||
bool checkShape = (maxprims > 0 && group.PrimCount > maxprims);
|
||||
|
||||
foreach (SceneObjectPart part in group.Parts)
|
||||
{
|
||||
if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys)
|
||||
@@ -1407,6 +1410,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
allow = false;
|
||||
break;
|
||||
}
|
||||
if (checkShape && part.PhysicsShapeType != (byte)PhysicsShapeType.None)
|
||||
{
|
||||
if (--maxprims < 0)
|
||||
{
|
||||
allow = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!allow)
|
||||
|
||||
Reference in New Issue
Block a user