From 055b8a2d58a17d5dbc6cdb7f22077e6268578905 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 14 Jan 2013 22:24:24 -0800 Subject: move resit fix to ScenePresence.cs and allow for requesting sit on objects other than the object currently sat on --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 15 +++------------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++ 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index a8517e6..967fa44 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6427,19 +6427,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; - if (handlerAgentRequestSit != null) - if (!(agentRequestSit.AgentData == null - || agentRequestSit.TargetObject == null - || agentRequestSit.TargetObject.TargetID == null - || agentRequestSit.TargetObject.Offset == null)) - { - var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID); - if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting - return true; - handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, - agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); - } + if (handlerAgentRequestSit != null) + handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, + agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); } return true; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0219540..6979c33 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1954,6 +1954,10 @@ namespace OpenSim.Region.Framework.Scenes { if (ParentID != 0) { + var targetPart = m_scene.GetSceneObjectPart(targetID); + if (targetPart != null && targetPart.LocalId == ParentID) + return; // already sitting here, ignore + StandUp(); } -- cgit v1.1