diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index d27af09e05..b0419869bd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -413,6 +413,64 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Start spinning the given object + /// + /// + /// + /// + 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); + } + } + } + + /// + /// Spin the given object + /// + /// + /// + /// + 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) { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0d6af77c97..d77b8ae662 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -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; diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0e5720fd91..4947083063 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1700,46 +1700,6 @@ namespace OpenSim.Region.Framework.Scenes } } */ - /// - /// Start spinning the given object - /// - /// - /// - /// - 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); - } - } - } - - /// - /// Spin the given object - /// - /// - /// - /// - 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(); - } - } /// ///