Merge branch 'master' of git://opensimulator.org/git/opensim

user_profiles
Robert Adams 2013-01-15 01:46:30 -08:00
commit edf198b766
3 changed files with 8 additions and 13 deletions

View File

@ -6427,19 +6427,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion #endregion
AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; 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, if (handlerAgentRequestSit != null)
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
} agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
} }
return true; return true;
} }

View File

@ -1954,6 +1954,10 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (ParentID != 0) if (ParentID != 0)
{ {
var targetPart = m_scene.GetSceneObjectPart(targetID);
if (targetPart != null && targetPart.LocalId == ParentID)
return; // already sitting here, ignore
StandUp(); StandUp();
} }

View File

@ -1,4 +1,4 @@
=== The Quick Guide to OpenSim Unit Testing === ===== The Quick Guide to OpenSim Unit Testing ===
== Running Tests == == Running Tests ==