diff options
author | UbitUmarov | 2016-09-16 19:33:49 +0100 |
---|---|---|
committer | UbitUmarov | 2016-09-16 19:33:49 +0100 |
commit | 1b1871120516552fd5e51e15fa95c2f881647088 (patch) | |
tree | 58ae3b5a08aa05edf4953b11b2e3d29da6fd424c /OpenSim/Region/Framework | |
parent | pass touch_end as other touchs, make blockgrab work on nonphysical also (diff) | |
download | opensim-SC-1b1871120516552fd5e51e15fa95c2f881647088.zip opensim-SC-1b1871120516552fd5e51e15fa95c2f881647088.tar.gz opensim-SC-1b1871120516552fd5e51e15fa95c2f881647088.tar.bz2 opensim-SC-1b1871120516552fd5e51e15fa95c2f881647088.tar.xz |
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)
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 58 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 10 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 40 |
3 files changed, 64 insertions, 44 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index d27af09..b041986 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 | |||
413 | } | 413 | } |
414 | } | 414 | } |
415 | 415 | ||
416 | /// <summary> | ||
417 | /// Start spinning the given object | ||
418 | /// </summary> | ||
419 | /// <param name="objectID"></param> | ||
420 | /// <param name="rotation"></param> | ||
421 | /// <param name="remoteClient"></param> | ||
422 | public virtual void ProcessSpinStart(UUID objectID, IClientAPI remoteClient) | ||
423 | { | ||
424 | SceneObjectGroup group = GetGroupByPrim(objectID); | ||
425 | if (group != null) | ||
426 | { | ||
427 | if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | ||
428 | { | ||
429 | group.SpinStart(remoteClient); | ||
430 | } | ||
431 | } | ||
432 | } | ||
433 | |||
434 | /// <summary> | ||
435 | /// Spin the given object | ||
436 | /// </summary> | ||
437 | /// <param name="objectID"></param> | ||
438 | /// <param name="rotation"></param> | ||
439 | /// <param name="remoteClient"></param> | ||
440 | public virtual void ProcessSpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient) | ||
441 | { | ||
442 | SceneObjectGroup group = GetGroupByPrim(objectID); | ||
443 | if (group != null) | ||
444 | { | ||
445 | if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | ||
446 | { | ||
447 | group.SpinMovement(rotation, remoteClient); | ||
448 | } | ||
449 | // This is outside the above permissions condition | ||
450 | // so that if the object is locked the client moving the object | ||
451 | // get's it's position on the simulator even if it was the same as before | ||
452 | // This keeps the moving user's client in sync with the rest of the world. | ||
453 | group.SendGroupTerseUpdate(); | ||
454 | } | ||
455 | } | ||
456 | |||
457 | public virtual void ProcessSpinObjectStop(UUID objectID, IClientAPI remoteClient) | ||
458 | { | ||
459 | SceneObjectGroup group = GetGroupByPrim(objectID); | ||
460 | if (group != null) | ||
461 | { | ||
462 | if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | ||
463 | { | ||
464 | // group.SpinMovement(rotation, remoteClient); | ||
465 | } | ||
466 | // This is outside the above permissions condition | ||
467 | // so that if the object is locked the client moving the object | ||
468 | // get's it's position on the simulator even if it was the same as before | ||
469 | // This keeps the moving user's client in sync with the rest of the world. | ||
470 | group.SendGroupTerseUpdate(); | ||
471 | } | ||
472 | } | ||
473 | |||
416 | public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID, | 474 | public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID, |
417 | UUID itemID) | 475 | UUID itemID) |
418 | { | 476 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0d6af77..d77b8ae 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3329,8 +3329,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3329 | client.OnObjectRequest += RequestPrim; | 3329 | client.OnObjectRequest += RequestPrim; |
3330 | client.OnObjectSelect += SelectPrim; | 3330 | client.OnObjectSelect += SelectPrim; |
3331 | client.OnObjectDeselect += DeselectPrim; | 3331 | client.OnObjectDeselect += DeselectPrim; |
3332 | client.OnSpinStart += m_sceneGraph.SpinStart; | ||
3333 | client.OnSpinUpdate += m_sceneGraph.SpinObject; | ||
3334 | client.OnDeRezObject += DeRezObjects; | 3332 | client.OnDeRezObject += DeRezObjects; |
3335 | 3333 | ||
3336 | client.OnObjectName += m_sceneGraph.PrimName; | 3334 | client.OnObjectName += m_sceneGraph.PrimName; |
@@ -3346,6 +3344,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3346 | client.OnGrabObject += ProcessObjectGrab; | 3344 | client.OnGrabObject += ProcessObjectGrab; |
3347 | client.OnGrabUpdate += ProcessObjectGrabUpdate; | 3345 | client.OnGrabUpdate += ProcessObjectGrabUpdate; |
3348 | client.OnDeGrabObject += ProcessObjectDeGrab; | 3346 | client.OnDeGrabObject += ProcessObjectDeGrab; |
3347 | client.OnSpinStart += ProcessSpinStart; | ||
3348 | client.OnSpinUpdate += ProcessSpinObject; | ||
3349 | client.OnSpinStop += ProcessSpinObjectStop; | ||
3349 | client.OnUndo += m_sceneGraph.HandleUndo; | 3350 | client.OnUndo += m_sceneGraph.HandleUndo; |
3350 | client.OnRedo += m_sceneGraph.HandleRedo; | 3351 | client.OnRedo += m_sceneGraph.HandleRedo; |
3351 | client.OnObjectDescription += m_sceneGraph.PrimDescription; | 3352 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
@@ -3456,8 +3457,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3456 | client.OnObjectRequest -= RequestPrim; | 3457 | client.OnObjectRequest -= RequestPrim; |
3457 | client.OnObjectSelect -= SelectPrim; | 3458 | client.OnObjectSelect -= SelectPrim; |
3458 | client.OnObjectDeselect -= DeselectPrim; | 3459 | client.OnObjectDeselect -= DeselectPrim; |
3459 | client.OnSpinStart -= m_sceneGraph.SpinStart; | ||
3460 | client.OnSpinUpdate -= m_sceneGraph.SpinObject; | ||
3461 | client.OnDeRezObject -= DeRezObjects; | 3460 | client.OnDeRezObject -= DeRezObjects; |
3462 | client.OnObjectName -= m_sceneGraph.PrimName; | 3461 | client.OnObjectName -= m_sceneGraph.PrimName; |
3463 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; | 3462 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; |
@@ -3472,6 +3471,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3472 | client.OnGrabObject -= ProcessObjectGrab; | 3471 | client.OnGrabObject -= ProcessObjectGrab; |
3473 | client.OnGrabUpdate -= ProcessObjectGrabUpdate; | 3472 | client.OnGrabUpdate -= ProcessObjectGrabUpdate; |
3474 | client.OnDeGrabObject -= ProcessObjectDeGrab; | 3473 | client.OnDeGrabObject -= ProcessObjectDeGrab; |
3474 | client.OnSpinStart -= ProcessSpinStart; | ||
3475 | client.OnSpinUpdate -= ProcessSpinObject; | ||
3476 | client.OnSpinStop -= ProcessSpinObjectStop; | ||
3475 | client.OnUndo -= m_sceneGraph.HandleUndo; | 3477 | client.OnUndo -= m_sceneGraph.HandleUndo; |
3476 | client.OnRedo -= m_sceneGraph.HandleRedo; | 3478 | client.OnRedo -= m_sceneGraph.HandleRedo; |
3477 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; | 3479 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0e5720f..4947083 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1700,46 +1700,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1700 | } | 1700 | } |
1701 | } | 1701 | } |
1702 | */ | 1702 | */ |
1703 | /// <summary> | ||
1704 | /// Start spinning the given object | ||
1705 | /// </summary> | ||
1706 | /// <param name="objectID"></param> | ||
1707 | /// <param name="rotation"></param> | ||
1708 | /// <param name="remoteClient"></param> | ||
1709 | protected internal void SpinStart(UUID objectID, IClientAPI remoteClient) | ||
1710 | { | ||
1711 | SceneObjectGroup group = GetGroupByPrim(objectID); | ||
1712 | if (group != null) | ||
1713 | { | ||
1714 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | ||
1715 | { | ||
1716 | group.SpinStart(remoteClient); | ||
1717 | } | ||
1718 | } | ||
1719 | } | ||
1720 | |||
1721 | /// <summary> | ||
1722 | /// Spin the given object | ||
1723 | /// </summary> | ||
1724 | /// <param name="objectID"></param> | ||
1725 | /// <param name="rotation"></param> | ||
1726 | /// <param name="remoteClient"></param> | ||
1727 | protected internal void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient) | ||
1728 | { | ||
1729 | SceneObjectGroup group = GetGroupByPrim(objectID); | ||
1730 | if (group != null) | ||
1731 | { | ||
1732 | if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) | ||
1733 | { | ||
1734 | group.SpinMovement(rotation, remoteClient); | ||
1735 | } | ||
1736 | // This is outside the above permissions condition | ||
1737 | // so that if the object is locked the client moving the object | ||
1738 | // get's it's position on the simulator even if it was the same as before | ||
1739 | // This keeps the moving user's client in sync with the rest of the world. | ||
1740 | group.SendGroupTerseUpdate(); | ||
1741 | } | ||
1742 | } | ||
1743 | 1703 | ||
1744 | /// <summary> | 1704 | /// <summary> |
1745 | /// | 1705 | /// |