From c34805d57358f45170602cd744c82086b31b23c6 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 12 Nov 2008 01:40:38 +0000 Subject: [PATCH] Add the missing bits that got lost in the prim clamping commit. This should actually make it work --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 508ddd43a9..c8f4a726b8 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -242,6 +242,23 @@ namespace OpenSim.Region.Environment.Scenes if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero) return false; + if (m_parentScene.m_clampPrimSize) + { + foreach (SceneObjectPart part in sceneObject.Children.Values) + { + Vector3 scale = part.Shape.Scale; + + if (scale.X > m_parentScene.m_maxNonphys) + scale.X = m_parentScene.m_maxNonphys; + if (scale.Y > m_parentScene.m_maxNonphys) + scale.Y = m_parentScene.m_maxNonphys; + if (scale.Z > m_parentScene.m_maxNonphys) + scale.Z = m_parentScene.m_maxNonphys; + + part.Shape.Scale = scale; + } + } + sceneObject.AttachToScene(m_parentScene); lock (Entities)