From 586e4cf163cd68b47fce0b25ee34a0155d41bf4c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 17 Oct 2016 19:16:07 +0100 Subject: [PATCH] ignore prims with shape type none on max size check for physics --- .../Framework/Scenes/SceneObjectGroup.cs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 53a9441896..e643db7436 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3869,15 +3869,11 @@ namespace OpenSim.Region.Framework.Scenes for (int i = 0; i < parts.Length; i++) { SceneObjectPart part = parts[i]; - if (part.Scale.X > m_scene.m_maxPhys || - part.Scale.Y > m_scene.m_maxPhys || - part.Scale.Z > m_scene.m_maxPhys ) - { - UsePhysics = false; // Reset physics - break; - } - if (checkShape && part.PhysicsShapeType != (byte)PhysicsShapeType.None) + if(part.PhysicsShapeType == (byte)PhysicsShapeType.None) + continue; // assuming root type was checked elsewhere + + if (checkShape) { if (--maxprims < 0) { @@ -3885,6 +3881,14 @@ namespace OpenSim.Region.Framework.Scenes break; } } + + if (part.Scale.X > m_scene.m_maxPhys || + part.Scale.Y > m_scene.m_maxPhys || + part.Scale.Z > m_scene.m_maxPhys ) + { + UsePhysics = false; // Reset physics + break; + } } }