diff options
author | Justin Clark-Casey (justincc) | 2013-08-21 21:35:03 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-21 21:35:03 +0100 |
commit | 1f39a763a5186c7c51e10b5b055394672cc6c54e (patch) | |
tree | 976f85d425fe2596245c5e9867cbc4c3e12917b6 /OpenSim | |
parent | * Fix some threading issues in BulletXNA (the managed bullet library), this s... (diff) | |
download | opensim-SC_OLD-1f39a763a5186c7c51e10b5b055394672cc6c54e.zip opensim-SC_OLD-1f39a763a5186c7c51e10b5b055394672cc6c54e.tar.gz opensim-SC_OLD-1f39a763a5186c7c51e10b5b055394672cc6c54e.tar.bz2 opensim-SC_OLD-1f39a763a5186c7c51e10b5b055394672cc6c54e.tar.xz |
Don't allow users to attempt to sit on objects in a child region without going to that region first.
If this is attempted, they get a "Try moving closer. Can't sit on object because it is not in the same region as you." message instead, which is the same as current ll grid.
Sitting on ground is okay, since viewer navigates avatar to required region first before sitting.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f0d8181..8c51077 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -6651,6 +6651,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6651 | } | 6651 | } |
6652 | #endregion | 6652 | #endregion |
6653 | 6653 | ||
6654 | if (SceneAgent.IsChildAgent) | ||
6655 | { | ||
6656 | SendCantSitBecauseChildAgentResponse(); | ||
6657 | return true; | ||
6658 | } | ||
6659 | |||
6654 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; | 6660 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; |
6655 | 6661 | ||
6656 | if (handlerAgentRequestSit != null) | 6662 | if (handlerAgentRequestSit != null) |
@@ -6675,6 +6681,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6675 | } | 6681 | } |
6676 | #endregion | 6682 | #endregion |
6677 | 6683 | ||
6684 | if (SceneAgent.IsChildAgent) | ||
6685 | { | ||
6686 | SendCantSitBecauseChildAgentResponse(); | ||
6687 | return true; | ||
6688 | } | ||
6689 | |||
6678 | AgentSit handlerAgentSit = OnAgentSit; | 6690 | AgentSit handlerAgentSit = OnAgentSit; |
6679 | if (handlerAgentSit != null) | 6691 | if (handlerAgentSit != null) |
6680 | { | 6692 | { |
@@ -6684,6 +6696,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6684 | return true; | 6696 | return true; |
6685 | } | 6697 | } |
6686 | 6698 | ||
6699 | /// <summary> | ||
6700 | /// Used when a child agent gets a sit response which should not be fulfilled. | ||
6701 | /// </summary> | ||
6702 | private void SendCantSitBecauseChildAgentResponse() | ||
6703 | { | ||
6704 | SendAlertMessage("Try moving closer. Can't sit on object because it is not in the same region as you."); | ||
6705 | } | ||
6706 | |||
6687 | private bool HandleSoundTrigger(IClientAPI sender, Packet Pack) | 6707 | private bool HandleSoundTrigger(IClientAPI sender, Packet Pack) |
6688 | { | 6708 | { |
6689 | SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack; | 6709 | SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 37e5286..4fc207a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2297,6 +2297,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2297 | 2297 | ||
2298 | public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset) | 2298 | public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset) |
2299 | { | 2299 | { |
2300 | if (IsChildAgent) | ||
2301 | return; | ||
2302 | |||
2300 | if (ParentID != 0) | 2303 | if (ParentID != 0) |
2301 | { | 2304 | { |
2302 | if (ParentPart.UUID == targetID) | 2305 | if (ParentPart.UUID == targetID) |
@@ -2523,6 +2526,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2523 | 2526 | ||
2524 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) | 2527 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) |
2525 | { | 2528 | { |
2529 | if (IsChildAgent) | ||
2530 | return; | ||
2531 | |||
2526 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); | 2532 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); |
2527 | 2533 | ||
2528 | if (part != null) | 2534 | if (part != null) |
@@ -2583,6 +2589,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2583 | 2589 | ||
2584 | public void HandleAgentSitOnGround() | 2590 | public void HandleAgentSitOnGround() |
2585 | { | 2591 | { |
2592 | if (IsChildAgent) | ||
2593 | return; | ||
2594 | |||
2586 | // m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.. | 2595 | // m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.. |
2587 | m_AngularVelocity = Vector3.Zero; | 2596 | m_AngularVelocity = Vector3.Zero; |
2588 | Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | 2597 | Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); |