aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAliciaRaven2015-05-04 04:10:08 +0100
committerBlueWall2015-05-13 12:16:14 -0500
commitcb586d11582fa2641fe99edc6367edc800af0ba0 (patch)
tree5483d4c5638baaaa32f45ef42f622d4c9e0986c8
parentupdate libomv to 6b8afb2b61d3 (diff)
downloadopensim-SC_OLD-cb586d11582fa2641fe99edc6367edc800af0ba0.zip
opensim-SC_OLD-cb586d11582fa2641fe99edc6367edc800af0ba0.tar.gz
opensim-SC_OLD-cb586d11582fa2641fe99edc6367edc800af0ba0.tar.bz2
opensim-SC_OLD-cb586d11582fa2641fe99edc6367edc800af0ba0.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. 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. This version fixes issues where scripts in child prims were not detected and also blocks grab for attachments. Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs30
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..866a43c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2672,20 +2672,27 @@ 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 /// This MUST be blocked for linksets that contain touch scripts because the viewer triggers grab on the touch
2688 /// event (Viewer Bug?) This would allow anyone to drag a linkset with a touch script. SL behaviour is also to
2689 /// block grab on prims with touch events.
2690 /// </summary>
2691 /// <param name="pos">New Position</param>
2685 public void NonPhysicalGrabMovement(Vector3 pos) 2692 public void NonPhysicalGrabMovement(Vector3 pos)
2686 { 2693 {
2687 AbsolutePosition = pos; 2694 if(!IsAttachment && ScriptCount() == 0)
2688 m_rootPart.SendTerseUpdateToAllClients(); 2695 UpdateGroupPosition(pos);
2689 } 2696 }
2690 2697
2691 /// <summary> 2698 /// <summary>
@@ -2781,17 +2788,28 @@ namespace OpenSim.Region.Framework.Scenes
2781 } 2788 }
2782 else 2789 else
2783 { 2790 {
2784 //NonPhysicalSpinMovement(pos); 2791 NonPhysicalSpinMovement(newOrientation);
2785 } 2792 }
2786 } 2793 }
2787 else 2794 else
2788 { 2795 {
2789 //NonPhysicalSpinMovement(pos); 2796 NonPhysicalSpinMovement(newOrientation);
2790 } 2797 }
2791 } 2798 }
2792 } 2799 }
2793 2800
2794 /// <summary> 2801 /// <summary>
2802 /// Apply rotation for spinning non-physical linksets (Ctrl+Shift+Drag)
2803 /// As with dragging, scripted objects must be blocked from spinning
2804 /// </summary>
2805 /// <param name="newOrientation">New Rotation</param>
2806 private void NonPhysicalSpinMovement(Quaternion newOrientation)
2807 {
2808 if(!IsAttachment && ScriptCount() == 0)
2809 UpdateGroupRotationR(newOrientation);
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>