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>
inv-download
AliciaRaven 2015-04-20 05:36:39 +01:00 committed by Michael Cerquoni
parent 263db44129
commit f11720d71f
1 changed files with 24 additions and 6 deletions

View File

@ -2672,20 +2672,26 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
//NonPhysicalGrabMovement(pos);
NonPhysicalGrabMovement(pos);
}
}
else
{
//NonPhysicalGrabMovement(pos);
NonPhysicalGrabMovement(pos);
}
}
}
/// <summary>
/// Apply possition for grabbing non-physical linksets (ctrl+drag)
/// </summary>
/// <param name="pos">New Position</param>
public void NonPhysicalGrabMovement(Vector3 pos)
{
AbsolutePosition = pos;
m_rootPart.SendTerseUpdateToAllClients();
if((m_rootPart.Flags & PrimFlags.Scripted) == 0)
{
UpdateGroupPosition(pos);
}
}
/// <summary>
@ -2781,16 +2787,28 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
//NonPhysicalSpinMovement(pos);
NonPhysicalSpinMovement(newOrientation);
}
}
else
{
//NonPhysicalSpinMovement(pos);
NonPhysicalSpinMovement(newOrientation);
}
}
}
/// <summary>
/// Apply rotation for spinning non-physical linksets (ctrl+shift+drag)
/// </summary>
/// <param name="newOrientation">New Rotation</param>
private void NonPhysicalSpinMovement(Quaternion newOrientation)
{
if ((m_rootPart.Flags & PrimFlags.Scripted) == 0)
{
UpdateGroupRotationR(newOrientation);
}
}
/// <summary>
/// Set the name of a prim
/// </summary>