diff options
author | AliciaRaven | 2015-04-20 05:36:39 +0100 |
---|---|---|
committer | Michael Cerquoni | 2015-04-20 16:38:37 -0400 |
commit | f11720d71fee66b7dc902c3a6632e571824e2288 (patch) | |
tree | 241936a2496dd4a9ddf4a1cae9546efa2b129c35 | |
parent | Implement llGetBoundingBox fully. (diff) | |
download | opensim-SC-f11720d71fee66b7dc902c3a6632e571824e2288.zip opensim-SC-f11720d71fee66b7dc902c3a6632e571824e2288.tar.gz opensim-SC-f11720d71fee66b7dc902c3a6632e571824e2288.tar.bz2 opensim-SC-f11720d71fee66b7dc902c3a6632e571824e2288.tar.xz |
Enable grab feature (Ctrl+Drag) for non-physical link-sets and add code to handle spin (Ctrl+Shift+Drag)
This patch fixes permission issues with dragging scripted objects. As on LL grid, scripted prims can not be dragged now. Also after dragging, the group was not marked as updated. This meant that after the region was restarted the group would revert to its original position.
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0a1a226..75da299 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2672,20 +2672,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2672 | } | 2672 | } |
2673 | else | 2673 | else |
2674 | { | 2674 | { |
2675 | //NonPhysicalGrabMovement(pos); | 2675 | NonPhysicalGrabMovement(pos); |
2676 | } | 2676 | } |
2677 | } | 2677 | } |
2678 | else | 2678 | else |
2679 | { | 2679 | { |
2680 | //NonPhysicalGrabMovement(pos); | 2680 | NonPhysicalGrabMovement(pos); |
2681 | } | 2681 | } |
2682 | } | 2682 | } |
2683 | } | 2683 | } |
2684 | 2684 | ||
2685 | /// <summary> | ||
2686 | /// Apply possition for grabbing non-physical linksets (ctrl+drag) | ||
2687 | /// </summary> | ||
2688 | /// <param name="pos">New Position</param> | ||
2685 | public void NonPhysicalGrabMovement(Vector3 pos) | 2689 | public void NonPhysicalGrabMovement(Vector3 pos) |
2686 | { | 2690 | { |
2687 | AbsolutePosition = pos; | 2691 | if((m_rootPart.Flags & PrimFlags.Scripted) == 0) |
2688 | m_rootPart.SendTerseUpdateToAllClients(); | 2692 | { |
2693 | UpdateGroupPosition(pos); | ||
2694 | } | ||
2689 | } | 2695 | } |
2690 | 2696 | ||
2691 | /// <summary> | 2697 | /// <summary> |
@@ -2781,17 +2787,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
2781 | } | 2787 | } |
2782 | else | 2788 | else |
2783 | { | 2789 | { |
2784 | //NonPhysicalSpinMovement(pos); | 2790 | NonPhysicalSpinMovement(newOrientation); |
2785 | } | 2791 | } |
2786 | } | 2792 | } |
2787 | else | 2793 | else |
2788 | { | 2794 | { |
2789 | //NonPhysicalSpinMovement(pos); | 2795 | NonPhysicalSpinMovement(newOrientation); |
2790 | } | 2796 | } |
2791 | } | 2797 | } |
2792 | } | 2798 | } |
2793 | 2799 | ||
2794 | /// <summary> | 2800 | /// <summary> |
2801 | /// Apply rotation for spinning non-physical linksets (ctrl+shift+drag) | ||
2802 | /// </summary> | ||
2803 | /// <param name="newOrientation">New Rotation</param> | ||
2804 | private void NonPhysicalSpinMovement(Quaternion newOrientation) | ||
2805 | { | ||
2806 | if ((m_rootPart.Flags & PrimFlags.Scripted) == 0) | ||
2807 | { | ||
2808 | UpdateGroupRotationR(newOrientation); | ||
2809 | } | ||
2810 | } | ||
2811 | |||
2812 | /// <summary> | ||
2795 | /// Set the name of a prim | 2813 | /// Set the name of a prim |
2796 | /// </summary> | 2814 | /// </summary> |
2797 | /// <param name="name"></param> | 2815 | /// <param name="name"></param> |