Fix a corner case where checking for region corssing may cross an avatar back if

it's pending to be sat onto a vehicle that is in the process of crossing.
avinationmerge
Melanie 2012-06-08 18:25:36 +02:00
parent 1eee525c88
commit efff5a7c0d
1 changed files with 7 additions and 2 deletions

View File

@ -1051,6 +1051,7 @@ namespace OpenSim.Region.Framework.Scenes
IsChildAgent = true; IsChildAgent = true;
m_scene.SwapRootAgentCount(true); m_scene.SwapRootAgentCount(true);
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
ParentID = 0; // Child agents can't be sitting
// FIXME: Set RegionHandle to the region handle of the scene this agent is moving into // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into
@ -2091,6 +2092,9 @@ namespace OpenSim.Region.Framework.Scenes
public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset) public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset)
{ {
if (IsChildAgent)
return;
if (ParentID != 0) if (ParentID != 0)
{ {
StandUp(); StandUp();
@ -2893,8 +2897,9 @@ namespace OpenSim.Region.Framework.Scenes
// If we don't have a PhysActor, we can't cross anyway // If we don't have a PhysActor, we can't cross anyway
// Also don't do this while sat, sitting avatars cross with the // Also don't do this while sat, sitting avatars cross with the
// object they sit on. // object they sit on. ParentUUID denoted a pending sit, don't
if (ParentID != 0 || PhysicsActor == null) // interfere with it.
if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero)
return; return;
if (!IsInTransit) if (!IsInTransit)