aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2014-09-08 23:58:49 +0100
committerUbitUmarov2014-09-08 23:58:49 +0100
commit8e15d4ad57de6f2a0c900968ef778fba7cdced63 (patch)
tree658bf83163998e842ab5d453441370a61a2a43a4 /OpenSim/Region/ScriptEngine
parent on drop send full update on root prim, terse on others ( as sl ). Fix (diff)
downloadopensim-SC-8e15d4ad57de6f2a0c900968ef778fba7cdced63.zip
opensim-SC-8e15d4ad57de6f2a0c900968ef778fba7cdced63.tar.gz
opensim-SC-8e15d4ad57de6f2a0c900968ef778fba7cdced63.tar.bz2
opensim-SC-8e15d4ad57de6f2a0c900968ef778fba7cdced63.tar.xz
limit number of prims on physical objects. Not all cases covered still
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b569194..bb083fa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1400,6 +1400,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1400 SceneObjectGroup group = m_host.ParentGroup; 1400 SceneObjectGroup group = m_host.ParentGroup;
1401 bool allow = true; 1401 bool allow = true;
1402 1402
1403 int maxprims = World.m_linksetPhysCapacity;
1404 bool checkShape = (maxprims > 0 && group.PrimCount > maxprims);
1405
1403 foreach (SceneObjectPart part in group.Parts) 1406 foreach (SceneObjectPart part in group.Parts)
1404 { 1407 {
1405 if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) 1408 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
1407 allow = false; 1410 allow = false;
1408 break; 1411 break;
1409 } 1412 }
1413 if (checkShape && part.PhysicsShapeType != (byte)PhysicsShapeType.None)
1414 {
1415 if (--maxprims < 0)
1416 {
1417 allow = false;
1418 break;
1419 }
1420 }
1410 } 1421 }
1411 1422
1412 if (!allow) 1423 if (!allow)