diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e37bbd8..2aeccd8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -828,6 +828,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
828 | public UUID FromFolderID { get; set; } | 828 | public UUID FromFolderID { get; set; } |
829 | 829 | ||
830 | /// <summary> | 830 | /// <summary> |
831 | /// If true then grabs are blocked no matter what the individual part BlockGrab setting. | ||
832 | /// </summary> | ||
833 | /// <value><c>true</c> if block grab override; otherwise, <c>false</c>.</value> | ||
834 | public bool BlockGrabOverride { get; set; } | ||
835 | |||
836 | /// <summary> | ||
831 | /// IDs of all avatars sat on this scene object. | 837 | /// IDs of all avatars sat on this scene object. |
832 | /// </summary> | 838 | /// </summary> |
833 | /// <remarks> | 839 | /// <remarks> |
@@ -2610,20 +2616,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2610 | /// If object is physical, apply force to move it around | 2616 | /// If object is physical, apply force to move it around |
2611 | /// If object is not physical, just put it at the resulting location | 2617 | /// If object is not physical, just put it at the resulting location |
2612 | /// </summary> | 2618 | /// </summary> |
2619 | /// <param name="partID">Part ID to check for grab</param> | ||
2613 | /// <param name="offset">Always seems to be 0,0,0, so ignoring</param> | 2620 | /// <param name="offset">Always seems to be 0,0,0, so ignoring</param> |
2614 | /// <param name="pos">New position. We do the math here to turn it into a force</param> | 2621 | /// <param name="pos">New position. We do the math here to turn it into a force</param> |
2615 | /// <param name="remoteClient"></param> | 2622 | /// <param name="remoteClient"></param> |
2616 | public void GrabMovement(Vector3 offset, Vector3 pos, IClientAPI remoteClient) | 2623 | public void GrabMovement(UUID partID, Vector3 offset, Vector3 pos, IClientAPI remoteClient) |
2617 | { | 2624 | { |
2618 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) | 2625 | if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) |
2619 | { | 2626 | { |
2627 | SceneObjectPart part = GetPart(partID); | ||
2628 | |||
2629 | if (part == null) | ||
2630 | return; | ||
2631 | |||
2620 | PhysicsActor pa = m_rootPart.PhysActor; | 2632 | PhysicsActor pa = m_rootPart.PhysActor; |
2621 | 2633 | ||
2622 | if (pa != null) | 2634 | if (pa != null) |
2623 | { | 2635 | { |
2624 | if (pa.IsPhysical) | 2636 | if (pa.IsPhysical) |
2625 | { | 2637 | { |
2626 | if (!m_rootPart.BlockGrab) | 2638 | if (!BlockGrabOverride && !part.BlockGrab) |
2627 | { | 2639 | { |
2628 | Vector3 llmoveforce = pos - AbsolutePosition; | 2640 | Vector3 llmoveforce = pos - AbsolutePosition; |
2629 | Vector3 grabforce = llmoveforce; | 2641 | Vector3 grabforce = llmoveforce; |