move SpinObject funtions from Scenegraph to PacketHandlers, close to grab handles, since they are related operations (possible should be moving to graph, not clear this files roles)
parent
fb46eb3344
commit
1b18711205
|
@ -413,6 +413,64 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start spinning the given object
|
||||
/// </summary>
|
||||
/// <param name="objectID"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
public virtual void ProcessSpinStart(UUID objectID, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
group.SpinStart(remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spin the given object
|
||||
/// </summary>
|
||||
/// <param name="objectID"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
public virtual void ProcessSpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
group.SpinMovement(rotation, remoteClient);
|
||||
}
|
||||
// This is outside the above permissions condition
|
||||
// so that if the object is locked the client moving the object
|
||||
// get's it's position on the simulator even if it was the same as before
|
||||
// This keeps the moving user's client in sync with the rest of the world.
|
||||
group.SendGroupTerseUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessSpinObjectStop(UUID objectID, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
// group.SpinMovement(rotation, remoteClient);
|
||||
}
|
||||
// This is outside the above permissions condition
|
||||
// so that if the object is locked the client moving the object
|
||||
// get's it's position on the simulator even if it was the same as before
|
||||
// This keeps the moving user's client in sync with the rest of the world.
|
||||
group.SendGroupTerseUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,
|
||||
UUID itemID)
|
||||
{
|
||||
|
|
|
@ -3329,8 +3329,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
client.OnObjectRequest += RequestPrim;
|
||||
client.OnObjectSelect += SelectPrim;
|
||||
client.OnObjectDeselect += DeselectPrim;
|
||||
client.OnSpinStart += m_sceneGraph.SpinStart;
|
||||
client.OnSpinUpdate += m_sceneGraph.SpinObject;
|
||||
client.OnDeRezObject += DeRezObjects;
|
||||
|
||||
client.OnObjectName += m_sceneGraph.PrimName;
|
||||
|
@ -3346,6 +3344,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
client.OnGrabObject += ProcessObjectGrab;
|
||||
client.OnGrabUpdate += ProcessObjectGrabUpdate;
|
||||
client.OnDeGrabObject += ProcessObjectDeGrab;
|
||||
client.OnSpinStart += ProcessSpinStart;
|
||||
client.OnSpinUpdate += ProcessSpinObject;
|
||||
client.OnSpinStop += ProcessSpinObjectStop;
|
||||
client.OnUndo += m_sceneGraph.HandleUndo;
|
||||
client.OnRedo += m_sceneGraph.HandleRedo;
|
||||
client.OnObjectDescription += m_sceneGraph.PrimDescription;
|
||||
|
@ -3456,8 +3457,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
client.OnObjectRequest -= RequestPrim;
|
||||
client.OnObjectSelect -= SelectPrim;
|
||||
client.OnObjectDeselect -= DeselectPrim;
|
||||
client.OnSpinStart -= m_sceneGraph.SpinStart;
|
||||
client.OnSpinUpdate -= m_sceneGraph.SpinObject;
|
||||
client.OnDeRezObject -= DeRezObjects;
|
||||
client.OnObjectName -= m_sceneGraph.PrimName;
|
||||
client.OnObjectClickAction -= m_sceneGraph.PrimClickAction;
|
||||
|
@ -3472,6 +3471,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
client.OnGrabObject -= ProcessObjectGrab;
|
||||
client.OnGrabUpdate -= ProcessObjectGrabUpdate;
|
||||
client.OnDeGrabObject -= ProcessObjectDeGrab;
|
||||
client.OnSpinStart -= ProcessSpinStart;
|
||||
client.OnSpinUpdate -= ProcessSpinObject;
|
||||
client.OnSpinStop -= ProcessSpinObjectStop;
|
||||
client.OnUndo -= m_sceneGraph.HandleUndo;
|
||||
client.OnRedo -= m_sceneGraph.HandleRedo;
|
||||
client.OnObjectDescription -= m_sceneGraph.PrimDescription;
|
||||
|
|
|
@ -1700,46 +1700,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
*/
|
||||
/// <summary>
|
||||
/// Start spinning the given object
|
||||
/// </summary>
|
||||
/// <param name="objectID"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
protected internal void SpinStart(UUID objectID, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
group.SpinStart(remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spin the given object
|
||||
/// </summary>
|
||||
/// <param name="objectID"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
protected internal void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(objectID);
|
||||
if (group != null)
|
||||
{
|
||||
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
|
||||
{
|
||||
group.SpinMovement(rotation, remoteClient);
|
||||
}
|
||||
// This is outside the above permissions condition
|
||||
// so that if the object is locked the client moving the object
|
||||
// get's it's position on the simulator even if it was the same as before
|
||||
// This keeps the moving user's client in sync with the rest of the world.
|
||||
group.SendGroupTerseUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue