move resit fix to ScenePresence.cs and allow for requesting sit on objects other than the object currently sat on
parent
b5d55c129a
commit
055b8a2d58
|
@ -6427,20 +6427,11 @@ 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;
|
||||
|
||||
if (handlerAgentRequestSit != null)
|
||||
handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
|
||||
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue