From 654b3424c7999067869415e0a3c6b538a81c558c Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 12 Jul 2008 19:05:12 +0000 Subject: * Remove warning and tidy up logic in SceneObjectGroup.UpdatePrimFlags() --- .../Region/Environment/Scenes/SceneObjectGroup.cs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index f2c94c8..1482f9a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1997,22 +1997,21 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// Update prim flags for this group. /// /// /// /// /// - /// public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) { - SceneObjectPart part = GetChildPart(localID); - if (part != null) + SceneObjectPart selectionPart = GetChildPart(localID); + + if (selectionPart != null) { - // If we have children lock (m_parts) { - foreach (SceneObjectPart parts in m_parts.Values) + foreach (SceneObjectPart part in m_parts.Values) { if (part.Scale.X > 10.0 || part.Scale.Y > 10.0 || part.Scale.Z > 10.0) { @@ -2021,14 +2020,7 @@ namespace OpenSim.Region.Environment.Scenes } } - if (m_parts.Count > 1) - { - foreach (SceneObjectPart parts in m_parts.Values) - { - parts.UpdatePrimFlags(type, inUse, data); - } - } - else + foreach (SceneObjectPart part in m_parts.Values) { part.UpdatePrimFlags(type, inUse, data); } -- cgit v1.1