diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0100ab3..b0f0a5d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3685,16 +3685,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
3685 | 3685 | ||
3686 | if (togroup) | 3686 | if (togroup) |
3687 | { | 3687 | { |
3688 | // related to group | 3688 | // related to group |
3689 | if ((change & ObjectChangeType.Position) != 0) | 3689 | if ((change & (ObjectChangeType.Rotation | ObjectChangeType.Position)) != 0) |
3690 | { | 3690 | { |
3691 | group.AbsolutePosition = data.position; | 3691 | if ((change & ObjectChangeType.Rotation) != 0) |
3692 | updateType = updatetype.groupterse; | 3692 | { |
3693 | } | 3693 | group.RootPart.UpdateRotation(data.rotation); |
3694 | if ((change & ObjectChangeType.Rotation) != 0) | 3694 | updateType = updatetype.none; |
3695 | { | 3695 | } |
3696 | group.RootPart.UpdateRotation(data.rotation); | 3696 | if ((change & ObjectChangeType.Position) != 0) |
3697 | updateType = updatetype.none; | 3697 | { |
3698 | group.AbsolutePosition = data.position; | ||
3699 | updateType = updatetype.groupterse; | ||
3700 | } | ||
3701 | else | ||
3702 | // ugly rotation update of all parts | ||
3703 | { | ||
3704 | group.AbsolutePosition = AbsolutePosition; | ||
3705 | } | ||
3706 | |||
3698 | } | 3707 | } |
3699 | if ((change & ObjectChangeType.Scale) != 0) | 3708 | if ((change & ObjectChangeType.Scale) != 0) |
3700 | { | 3709 | { |
@@ -3719,10 +3728,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3719 | 3728 | ||
3720 | if (part == group.RootPart) | 3729 | if (part == group.RootPart) |
3721 | { | 3730 | { |
3722 | if ((change & ObjectChangeType.Position) != 0) | ||
3723 | group.UpdateRootPosition(data.position); | ||
3724 | if ((change & ObjectChangeType.Rotation) != 0) | 3731 | if ((change & ObjectChangeType.Rotation) != 0) |
3725 | group.UpdateRootRotation(data.rotation); | 3732 | group.UpdateRootRotation(data.rotation); |
3733 | if ((change & ObjectChangeType.Position) != 0) | ||
3734 | group.UpdateRootPosition(data.position); | ||
3726 | if ((change & ObjectChangeType.Scale) != 0) | 3735 | if ((change & ObjectChangeType.Scale) != 0) |
3727 | part.Resize(data.scale); | 3736 | part.Resize(data.scale); |
3728 | } | 3737 | } |