From 816a44d6dad4f20bbdc3d90cb60a862790ae97f3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 24 Apr 2012 21:48:12 +0100 Subject: [PATCH] SOG bug fix in UI object changes --- .../Framework/Scenes/SceneObjectGroup.cs | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0100ab3b5a..b0f0a5d874 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3685,16 +3685,25 @@ namespace OpenSim.Region.Framework.Scenes if (togroup) { - // related to group - if ((change & ObjectChangeType.Position) != 0) + // related to group + if ((change & (ObjectChangeType.Rotation | ObjectChangeType.Position)) != 0) { - group.AbsolutePosition = data.position; - updateType = updatetype.groupterse; - } - if ((change & ObjectChangeType.Rotation) != 0) - { - group.RootPart.UpdateRotation(data.rotation); - updateType = updatetype.none; + if ((change & ObjectChangeType.Rotation) != 0) + { + group.RootPart.UpdateRotation(data.rotation); + updateType = updatetype.none; + } + if ((change & ObjectChangeType.Position) != 0) + { + group.AbsolutePosition = data.position; + updateType = updatetype.groupterse; + } + else + // ugly rotation update of all parts + { + group.AbsolutePosition = AbsolutePosition; + } + } if ((change & ObjectChangeType.Scale) != 0) { @@ -3719,10 +3728,10 @@ namespace OpenSim.Region.Framework.Scenes if (part == group.RootPart) { - if ((change & ObjectChangeType.Position) != 0) - group.UpdateRootPosition(data.position); if ((change & ObjectChangeType.Rotation) != 0) group.UpdateRootRotation(data.rotation); + if ((change & ObjectChangeType.Position) != 0) + group.UpdateRootPosition(data.position); if ((change & ObjectChangeType.Scale) != 0) part.Resize(data.scale); }